Cant save UDT - blank page Topic is solved

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
johnboyuk1
Forum Members
Forum Members
Posts: 192
Joined: Mon Nov 26, 2018 3:09 pm

Cant save UDT - blank page

Post by johnboyuk1 »

Been working in a new UDT, it has been working fine until for some reason, now I cant save any UDTs - I just get taken to a blank page when clicking the 'Submit' button. Ive tried clearing the cache but this hasbnt fixed it.... any idea what I can do?

Dont know if it was a coincidence but this happened after clicking the 'run' button on the UDT page I was working on - not sure what thats actually supposed to do anyway?
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Cant save UDT - blank page

Post by DIGI3 »

Run runs the UDT - e.g. if it can provide a result it will show it to you from within the admin interface.

Blank page will almost always have a log entry if you have php error logging enabled. The exception would be if it's a 403 page, in which case you likely have mod_security on your server and will need to disable it.
Not getting the answer you need? CMSMS support options
johnboyuk1
Forum Members
Forum Members
Posts: 192
Joined: Mon Nov 26, 2018 3:09 pm

Re: Cant save UDT - blank page

Post by johnboyuk1 »

Here's the error:

AH01071: Got error 'PHP message: PHP Parse error: syntax error, unexpected '}' in /home/sites/21b/b/b5549c566a/public_html/admin/editusertag.php(93) : eval()'d code on line 2'
johnboyuk1
Forum Members
Forum Members
Posts: 192
Joined: Mon Nov 26, 2018 3:09 pm

Re: Cant save UDT - blank page

Post by johnboyuk1 »

ok - that suggests it was an error in my code ... even though i tried making another UDT with a basic

echo "hello word"

And had the same trouble ... turns out I should have out in a semicolon at the end!! That stops the blank page issue...

Thanks for the tip on looking in the php logs! Would be nice if CMSMS gave me some sort of error rather than a blank page :)
jce76350
Beta Tester
Beta Tester
Posts: 2023
Joined: Mon May 29, 2006 1:20 pm
Location: Rouen

Re: Cant save UDT - blank page

Post by jce76350 »

echo "hello word"; would be more correct

see https://docs.cmsmadesimple.org/tags/use ... ting-a-udt
Jean-Claude Etiemble
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Cant save UDT - blank page

Post by DIGI3 »

I don't think CMSMS would be able to give you an error in this case, as it's not CMSMS that's failing, it's the PHP code in your UDT. You'd have to add error handling into your UDT. PHP is giving you the error, and you can choose whether to display it, send it to logs, or ignore it.
Not getting the answer you need? CMSMS support options
johnboyuk1
Forum Members
Forum Members
Posts: 192
Joined: Mon Nov 26, 2018 3:09 pm

Re: Cant save UDT - blank page

Post by johnboyuk1 »

I get that the error is with the PHP... but CMSMS should just save the UDT still surely, rather than show me a blank page when I try and save it? And only give me an error when I actually call the UDT on. pages somewhere ... i would have assumed as far as CMSMS is concerned, at that stage its just a bunch of text to save somewhere... guess thats obviously not the case as CMSMS must be trying to process the PHP code when I try and save the UDT?

... live and learn, at least I know what the blank page means in future!
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Cant save UDT - blank page

Post by DIGI3 »

That's valid, I thought it was only on run but it appears it's on submit too. You may want to file a feature request for that - UDTs were neglected a bit as they were going to be replaced with a different method in 2.3, but that plan was scrapped.
Not getting the answer you need? CMSMS support options
Post Reply

Return to “CMSMS Core”