#1 June 29, 2014 9:33am

jono_hayward
Member
From: Melbourne, Australia
Registered: June 29, 2014
Posts: 11

Field Options not saving

Hi there,

I've been playing around with BigTree on my local development machine for a while and am absolutely loving it, have had no problems at all.

However I've just set up my first BT install on a real web host and have run into an option with module creation. I can set up my modules just fine through the Module Designer, but when I attempt to set field options for some of the fields in the module, they're simply not saving.

For instance, I set up a list field type, set it to required, and add a couple of static options for the list.
Screen%20Shot%202014-06-30%20at%2012.24.53%20am.png

However, once I click Save, I can open up the same Field Options dialog to find that the options I've specified have been cleared out and it's back to default:
Screen%20Shot%202014-06-30%20at%2012.25.10%20am.png.

I'm not getting any JS errors in the console. In the Network inspector, I can see a request is sent to /admin/ajax/developer/save-field-options with a response that would indicate it's parsed the list items I put in there:

$("#options_type").val("{\"list_type\":\"static\",\"allow-empty\":\"Yes\",\"list\":[{\"value\":\"Professional\",\"description\":\"Professional\"},{\"value\":\"Community\",\"description\":\"Community\"}],\"pop-table\":\"\"}");

So I'm a bit puzzled.
This is a pretty standard UNIX shared hosting environment.

The only other problem I've had setting up BigTree in this environment is that the server did not like the two php_flag directives at the end of /site/.htaccess - according to the error log, php_flag is invalid so it gave me a 500 error. After commenting those out (I'm sure short tags are enabled on this server), I was off and away with no problems.

Any ideas?

Cheers big_smile

Offline

#2 June 29, 2014 9:49am

jono_hayward
Member
From: Melbourne, Australia
Registered: June 29, 2014
Posts: 11

Re: Field Options not saving

I guess I should note, whilst mentioning the modifications that I had to make to /site/.htaccess, that my server does have magic_quotes_gpc turned on, and being a shared environment I may not be able to get my host to turn them off lest it affect other sites - which is why I just commented out the line in the .htaccess that attempted to disable them. Could that be causing the issue?

Offline

#3 June 29, 2014 10:40am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Field Options not saving

It sounds very much like a magic quotes issue. Magic quotes causes the data to be double escaped (so data fails to then decode properly). Some shared hosts allow you to have custom php.ini files - I would check into that to see if you can manually disable the magic quotes.

If there's no way to shut them off I'm afraid there's nothing you can do, lots of BigTree will fail to work properly as it always expects data to be unescaped.

Offline

#4 June 29, 2014 11:37pm

jono_hayward
Member
From: Melbourne, Australia
Registered: June 29, 2014
Posts: 11

Re: Field Options not saving

Makes sense. Thanks!

I'll get in touch with my web host.

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.