Upgrading a site from 1.x to 2.x has thrown up an issue with a UDT.
This issue is that on submit (in admin) the UDT fails to save and instead goes to a page not found error.
I have narrowed the issue down to a single line..
$today = date("Y-m-d G:i:s");
$title = $course_name." ".$firstname." ".$surname;
$title_clean = preg_replace("![^a-z0-9]+!i", "-", $title);
$title_nospace = str_replace(" ","_",$title_clean);
$alias = strtolower($title_nospace);
So for some reason preg_replace causes the udt to die. I need to find a workaround to give me the same results from that line. Can anyone advise an route to take?
moving to 2.0 kills my udt on preg_replace
Re: moving to 2.0 kills my udt on preg_replace
It works for me. Turn on error displaying at your server, you might get an idea what goes wrong here...
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: moving to 2.0 kills my udt on preg_replace
I'd suspect mod_security kicking in.
Re: moving to 2.0 kills my udt on preg_replace
Thanks Chaps.
It was indeed a generic rule within mod_security. Changing it has solved the issue.
It was indeed a generic rule within mod_security. Changing it has solved the issue.