Problem with Route_To |
I have programmed the following route which works correctly, it uses a regex
Code: $routes->addPlaceholder('slug_alfa', '[a-z0-9]+[\-]?[a-z0-9]+([\-][a-z0-9]+)*'); But when using route_to function it fails, for example PHP Code: route_to("web_empresa_servicios_interes",'slug') preg_match(): Compilation failed: missing closing parenthesis at offset 41 SYSTEMPATH/Router/RouteCollection.php at line 1351
Did you try installing the develop version of CodeIgniter 4 any bugs may have been fixed.
CodeIgniter 4 develop version What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(04-06-2021, 01:39 AM)InsiteFX Wrote: Did you try installing the develop version of CodeIgniter 4 any bugs may have been fixed. I have copied the system folder from the link you provide. I have not modified the App folder because I already have enough code programmed. It all comes from the error that occurs in route_to, but how can I update Codeigniter 4 without it giving me problems? I have 4.0.4 version Now he tells me: CodeIgniter \ Exceptions \ FrameworkException The xml extension is not loaded SYSTEMPATH/CodeIgniter.php at line 234 SYSTEMPATH/CodeIgniter.php : 234 — CodeIgniter\Exceptions\FrameworkException::forMissingExtension ()
SYSTEMPATH/CodeIgniter.php : 234 — CodeIgniter\Exceptions\FrameworkException::forMissingExtension ()
That error means your missing the intl php extension in your php.ini file you need to edit it and add the extension. Also if your upgrading from 4.0.4 then there were also changes made to the app folder Config/app.php etc; So you would need to also replace the app folder. try this some times fixes the problem. PHP Code: route_to(base_url('your_url')); What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(04-07-2021, 01:43 AM)InsiteFX Wrote: SYSTEMPATH/CodeIgniter.php : 234 — CodeIgniter\Exceptions\FrameworkException::forMissingExtension () It does not solve the problem for me, but I will have to give you a bad solution. I see badly that to update the version I have to update the app folder where I have all the code, that is not feasible. That does not help to always be updated. Thanks for your time and for your help. |
Welcome Guest, Not a member yet? Register Sign In |