Skip to content
This repository was archived by the owner on Feb 1, 2019. It is now read-only.

Fix saving bug #64

Merged
merged 1 commit into from
Jun 10, 2015
Merged

Fix saving bug #64

merged 1 commit into from
Jun 10, 2015

Conversation

kurtrwall
Copy link

So it turns out that if you have a link that has no data in it, that link's meta_key will be assigned a null value on saving. When a null meta_key is encountered, the save() function, (rather stupidly) returns. We don't want the save() function to return unless it has finished going through all the keys that are passed to it. Furthermore, we want link fields to be assigned an empty string so when a link field is deleted on a post that is then RAMP'd, the post on production will replace the link's data with an empty string, which effectively deletes it.

Reproducing the bug

Before you pull this code in: if you go into the oah-journey-step post type and and save the wysiwyg fields and not the key_tool link field, the wysiwyg fields won't save!

Testing

Run phpunit or ./vendor/bin/phpunit if you don't have phpunit installed on your PATH.

P.S. Without this code, OAH's post type is breaking and cannot enter content without that link field entered.

@dpford @Scotchester

@Scotchester
Copy link
Contributor

Please update the version number in cms-toolkit.php.

@kurtrwall
Copy link
Author

Done!

@Scotchester
Copy link
Contributor

Fix tested and working locally!

Scotchester added a commit that referenced this pull request Jun 10, 2015
@Scotchester Scotchester merged commit 575b68a into cfpb:master Jun 10, 2015
@kurtrwall kurtrwall deleted the fix-bugs branch June 10, 2015 15:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants