# |
Jun 16th 2019, 04:20 |
subhanahmed |
Hi All, I just updated an old app to cakephp 3.7. I’m getting the following error: `Property _transportConfig does not exist ` in `ROOT/vendor/cakephp/debug_kit/src/Panel/MailPanel.php, line 43 ` Any solutions? Thanks. |
# |
Jun 15th 2019, 23:29 |
joey.mukherjee |
@khalid These are my two ajax calls. I feel like they are pretty basic... I see the _Token in my page source. It is just after the form end. |
# |
Jun 15th 2019, 23:27 |
slackebot1 |
$('#gvmain_content').html (data); }, error: function (data) { alert ('Something went wrong!'); console.log (data); $('#gvmain_content').html (data); } }); }); |
# |
Jun 15th 2019, 23:27 |
slackebot1 |
$this->Url->build ('/plots/change_version', true); ?>", type: 'GET', beforeSend: function (xhr) { xhr.setRequestHeader ('X-CSRF-Token', $('[name="_csrfToken"]').val ()); }, data: {version: version}, dataType: 'html', success: function (data) { |
# |
Jun 15th 2019, 23:27 |
slackebot1 |
complete: function () { // alert ('Complete on submission!'); } }); e.preventDefault (); }); $('body').on ('change', "#gv_version", function () { var version = $('#gv_version').val (); var ajaxData = $('#gvInputForm').serializeArray (); $.ajax ({ url:"<?php echo |
# |
Jun 15th 2019, 23:27 |
slackebot1 |
('X-CSRF-Token', $('[name="_csrfToken"]').val ()); }, data: data, success: function (data, text, xhr) { $('#output_div').html (data); }, error: function () { alert ('Error on submission!'); $('#output_div').html (data); }, |
# |
Jun 15th 2019, 23:27 |
joey.mukherjee |
$('body').on ('submit', "#gvInputForm", function (e) { data = $('#gvInputForm').serializeArray (), formURL = $('#gvInputForm').attr ('action'); // + '.json'; $.ajax ({ url: formURL, dataType: 'html', type: 'POST', beforeSend: function (xhr) { xhr.setRequestHeader |
# |
Jun 15th 2019, 23:21 |
khalid |
can you show Ajax call here? |
# |
Jun 15th 2019, 23:11 |
joey.mukherjee |
@khalid Hmm, yes, I did have it in there. However, taking it out didn't fix it. Any other ideas? |
# |
Jun 15th 2019, 23:07 |
scriptstupid |
I'm using FormHelper::control for a form and validation errors aren't being displayed. The entity is not saving and in the controller I can set a var to $entity->getErrors() and see them, yet the form itself displays nothing. Fields are named appropriately. |
# |
Jun 15th 2019, 22:52 |
khalid |
if that is there then you can remove it from Routes.php |
# |
Jun 15th 2019, 22:51 |
khalid |
if yes then you have to remove it.. because you can use it either routes based of on overall application, before you do it please check your Application.php it should have something like this $csrf = new CsrfProtectionMiddleware(); |
# |
Jun 15th 2019, 22:48 |
khalid |
@joey.mukherjee do you have csrf in your routes.php? |
# |
Jun 15th 2019, 21:51 |
scriptstupid |
disregard! Got it working. (className wasn't set to Smtp) |
# |
Jun 15th 2019, 21:43 |
kiwi_10 |
Hello. I've configured my default EmailTransport with the SSL info for my domain (port 465, etc.). I can see the correct templated email in the mail tab of DebugKit. Nonetheless, I get a SocketException with error "Failed to connect to mailserver at "localhost" port 25" |
# |
Jun 15th 2019, 20:28 |
waspinator |
can you have virtual fields for _joinData? |
# |
Jun 15th 2019, 19:35 |
joey.mukherjee |
when I do a form submit with csrf middleware I can get it to work the first time, but after an ajax request which changes the contents of the form, I get a _Token not found error. anyone have any ideas? |
# |
Jun 15th 2019, 08:27 |
admad |
@rightscoreanalysis you need to "use" the listingtable class, not TableRegistry |
# |
Jun 15th 2019, 07:37 |
rightscoreanalysis |
I think I need this: use Cake\ORM\TableRegistry; |
# |
Jun 15th 2019, 07:35 |
rightscoreanalysis |
In my model table file I have a constant: const TYPES = ['Sale' => '1', 'Wanted' => '2']; in another model table file I can reference the const with: ListingTable::TYPES['Sale']; but how can I reference it in a controller? the error I get is: 'App\Controller\Api\ListingTable' not found it's trying to find a controller |
# |
Jun 15th 2019, 07:35 |
rightscoreanalysis |
still strugglng with this |
# |
Jun 15th 2019, 05:15 |
admad |
As for how the middleware handles various exceptions walk through the errormiddleware code it |
# |
Jun 15th 2019, 05:14 |
admad |
@khalid don't understand what $next does read up about PSR-7 double pass middlewares. It's a general standard from the PHP-FIG group |
# |
Jun 15th 2019, 03:34 |
khalid |
what I want is one place where I have Exception object which I can use to do post exception tasks. |
# |
Jun 15th 2019, 03:33 |
khalid |
but CoreException seems to by pass all that.. |
# |
Jun 15th 2019, 03:33 |
khalid |
SPL Exceptions more or less follow the same structure of Errors |
# |
Jun 15th 2019, 03:33 |
khalid |
my question is: where and how it decide it how it needs to treat Core Exception differently than errors or spl exceptions |
# |
Jun 15th 2019, 03:32 |
khalid |
in error middleware what does this do? return $next($request, $response); I checked next its an object and its as far as I can notice its same for both error and exception but in case of Error it goes to Throwable, but in case of Exception it goes to Core Exception class constructor |
# |
Jun 15th 2019, 03:05 |
joey.mukherjee |
In case someone else has the same problem with the "Fatal error: Class 'App\Shell\Task\QueueTask' not found" error - the documentation is wrong. The Task needs to go into /src/Shell/Task/Queue and not /src/Shell/Task/ as the documentation says |
# |
Jun 15th 2019, 02:50 |
khalid |
@admad does cake have this in their documentation? Thanks for help mate |
# |
Jun 15th 2019, 02:30 |
joey |
I am getting this error when trying to use the queue plugin. I think I am missing a use line, but I have it! Any ideas? This is the error: Fatal error: Class 'App\Shell\Task\QueueTask' not found |
# |
Jun 15th 2019, 02:30 |
admad |
@khalid you need a custom exception middleware and load that instead of the core one in your Application:: bootstrap () |
# |
Jun 15th 2019, 02:28 |
admad |
@stephenzgalbraith yes they have cake 4 compatible branches |
# |
Jun 15th 2019, 01:34 |
stephenzgalbraith |
Does anyone know if the official cakephp authentication/authorization plugins are working on the 4.x releases ? |
# |
Jun 14th 2019, 23:38 |
khalid |
@rightscoreanalysis yes or maybe you can paste code |
# |
Jun 14th 2019, 23:37 |
khalid |
@dereuromark can you check my exceptionhandler issue.. any suggestion would be highly appreciated |
# |
Jun 14th 2019, 23:03 |
rightscoreanalysis |
something like: use use App\Model\ListingTable ? |
# |
Jun 14th 2019, 22:50 |
ricksaccous |
phew |
# |
Jun 14th 2019, 22:50 |
ricksaccous |
hang |
# |
Jun 14th 2019, 22:50 |
ricksaccous |
I'm starting to get tthe hand of widgets |
# |
Jun 14th 2019, 22:34 |
dereuromark |
You just forgot your use statement. Use an IDE, it helps to do those things |