Migrate from V1.2 to 1.3.11 MvcRouter::ajax_connect
nomadinteractif opened this issue · 3 comments
Hello,
I need to update your plugin on my client website from V1.2 to the current version.
Since, I did not build the website, I'am not sure what this code has an impact on.
MvcRouter::ajax_connect( array( 'controller' => 'probes', 'action' => 'find' ) ); MvcRouter::ajax_connect( array( 'controller' => 'probes', 'action' => 'get' ) ); MvcRouter::ajax_connect( array( 'controller' => 'probes', 'action' => 'getModelsParameters' ) ); MvcRouter::admin_ajax_connect( array( 'controller' => 'probes', 'action' => 'find' ) ); MvcRouter::admin_ajax_connect( array( 'controller' => 'probes', 'action' => 'get' ) ); MvcRouter::admin_ajax_connect( array( 'controller' => 'probes', 'action' => 'getModelsParameters' ) );
The method MvcRouter::ajax_connect
has been deprecated since the version 1.2 and generate a Fatal Error. From what I think, I could just remove the 3 lines with MvcRouter::ajax_connect and the 3 others with MvcRouter::admin_ajax_connect
will take care of the routing. I'am I right ? Otherwise, what should I do?
Thank you
Jasson
Instead of
MvcRouter::ajax_connect( array( 'controller' => 'probes', 'action' => 'find' ) );
use
MvcRouter::public_connect( array( 'controller' => 'probes', 'action' => 'find' ) );
I think that will do the job.
Great ! Thank you !