As on CakePHP 3.x, $this->view working properly in controller.
After migration to the CakePHP 4.x version, it doesn't seems to work. Can't find any documentation under CakeBook 4.x.
Is there any syntax changes in CakePHP 4.x for $this->view or it's deprecated in newer version ??
Starting with CakePHP 3.1, the Controller $view property is deprecated.
https://book.cakephp.org/3/en/appendices/3-1-migration-guide.html#controller
view - replaced with template
In CakePHP 4.x use $this->viewBuilder() to setting and getting view options:
https://book.cakephp.org/4/en/controllers.html#setting-view-options
https://book.cakephp.org/4/en/search.html?check_keywords=yes&area=default&q=viewBuilder
Related
I am trying to update jQuery for Drupal 7.87 to version 3.6.x. The jQuery_update module (7.x-3.0-alpha5)installed and the highest JQuery version I can pick from the dropdown list is 3.3.
Does anyone know if Drupal 7.87 support JQuery 3.6.x? If yes, how can I upgrade it properly?
Thanks
The module jquery_update allows to use "recent" versions of jQuery within Drupal but does not provide the latest versions because the changes tend to break Drupal 7 core JS.
A solution is to "side load" the newer version using the module jQuery Multi :
jQuery Multi allows you to load an extra version of the jQuery library
in parallel to Drupal's version, without conflicting with Drupal's
version.
For instance, if you're loading jQuery-3.6.0, the alias will be jq360, and you can use it in your scripts by wrapping your code as follows :
(function($){
// Code here
// ....
})(jq360)
Lodash 4 claim to work with Backbone >= 1.3.0
we are still working with Backbone 1.1.2 - what are our options? currently we use a custom build of lodash 1.2.1.
Is lodash v3 is compatible with that version?
Thanks!
jdalton (the main contributor to lodash) claims that it should just work (i.e. lodash 3 is compatible with backbone 1.1.2). so, in regards to the backbone code, everything should be fine.
see this comment on a github issue that poses the same question as yours.
regardless, you should check out lodash's official docs on compatibility warnings for version 3, and update your code wherever necessary.
My application is in angular version 1.2. We are planning to make any new changes using typescript and angular 2 syntax helpers (like ng-metadata or angular2-now)
Unfortunately the above syntax helpers only works for angular version 1.4+. Is there any such helpers available for angular 1.2?
try this Angular-Typescript project on github, and my advice is to updated your project to 1.4 or above to make it easier for you!
I am totally new to CakePHP.
I want Tinymce editor in my webpage.
I have followed the link: Using TinyMCE with CakePHP
As per this link I have added JavaScript helper in my AppController file but it shows an error: "Helper class javascriptHelper could not be found."
Also confused that where to place this code:
<?php if(isset($javascript)):
echo $javascript->link('tiny_mce/tiny_mce.js');
endif; ?>
I am using CakePHP 2.9.3 & TinyMCE 4.0.6
can anyone help me by specifying the step to configure TinyMCE.
Did you notice the publish date of that article you linked? :)
You can use this plugin for CakePHP 2.x.
I have been attempting to use CakePHP 2.0 and most of it works pretty well, however I have not been able to get console logging working with FireCake. I have FireBug 1.8.3 and FirePHP 0.6.2 installed in Firefox 6.0.2 and my old Cake 1.3 project works fine. For CakePHP 2.0 I downloaded the new version of DebugKit, put it in Plugins, added this to my AppController in Controllers folder:
App::import('Vendor', 'DebugKit.FireCake');
class AppController extends Controller {
public $components = array('Cookie', 'DebugKit.Toolbar', 'RequestHandler', 'Session');
and this in my bootstrap
CakePlugin::load('DebugKit');
and in core
Configure::write('debug', 2);
and then put this in one of my controller actions
FireCake::log($msg);
which generates an error like this
Fatal error: Class 'FireCake' not found in C:\Users\foo\Documents\Websites\cakephp-2.0.0.35\numbering\Controller\AppController.php on line 29
I can't figure out anything I might have missed from the instructions, so is there something duh-obvious I might be overlooking? Or some extra import that is necessary? Any help would be appreciated, thanks.
Matt
[edit]
I should add that the DebugKit menu appears as expected and functions, the problem is just FireCake.
The documentation was incorrect for CakePHP v 2.0. This is now required:
App::import('Lib', 'DebugKit.FireCake');
I believe you should use
App::uses('FireCake', 'DebugKit.Lib');
if you are on CakePHP 2.2 or higher.