Digital experiences for all disciplines
New Landing › How can we help? › Cardinal › Post Not Saving Meta Options
New Landing › How can we help? › Cardinal › Post Not Saving Meta Options
- This topic has 76 replies, 7 voices, and was last updated 9 years by Rui Guerreiro – SUPPORT.
-
Posted in: Cardinal
-
April 29, 2015 at 7:02 am #169813
Ok great, no problem
April 29, 2015 at 8:56 am #169871No problem George. Glad it’s sorted now.
We will also implement @shism2 solution that seems to work fine and speed up the saving process.
-Rui
May 27, 2015 at 8:19 pm #178928We also recently ran into this issue. Is @shism2’s solution viable?
I had done some research and came across this post on the WordPress forums that seems to be related. It appears that posts without a ‘template’ have an issue with meta data not being updated. I’m assuming that this may apply to using the SPB, as there’s no template for posts:
https://wordpress.org/support/topic/plugin-does-not-let-me-save-seo-settings-on-pages
Here’s the text of that post, for good measure:
“The problem is the _wp_page_template in the wp_postmeta table. This was being saved to a previous themes template name.
You can change the following line of code in wp-admin/includes/meta-boxes.php:if ( ‘page’ == $post->post_type && 0 != count( get_page_templates( $post ) ) ) {
on line 742 to the following:
if ( ‘page’ == $post->post_type ) {
This will force the page attributes to display “Default Template”. When saving the page this will then update the value in the DB.
The actual line which causes the problem is: $page_templates = wp_get_theme()->get_page_templates( $post ); which is in wp-includes/post.php. This returns blank and then fails to run update_post_meta();”
May 27, 2015 at 8:25 pm #178929Can anyone tell me exactly where to put the code from @shism2’s solution?
I’d like to know the line number (we’re on Cardinal 2.0.2) with info about the code in the previous and following lines, for good measure.
May 27, 2015 at 9:47 pm #178938Hi @grokism
That line from @shism2’s solution was added to the Swift Framework plugin, and we’ve not had any issues appear since then. You can add that to any JS which loads on the admin area – /js/sf-admin.js for example.
The issue you linked to above needs a change in the WordPress core, not the theme.
– Ed
May 27, 2015 at 10:31 pm #178941Which version of the Swift Framework plugin was it added to? I’m assuming it’s part of the theme files – we’re on 2.0.2, so does that include it?
May 27, 2015 at 10:50 pm #178945We moved the Swift Framework to a plugin with v2.07 of Cardinal – so you wouldn’t have the code unless you have updated to above that version of Cardinal.
– Ed
May 29, 2015 at 1:00 am #179353I’m still having a serious issue with this. I’m having the same issue as @shism2 where, if the SPB has more than 11 rows, the post won’t update the meta options or WordPress SEO settings.
I updated to v2.0.8 of the theme. I updated to WordPress 4.2.2. I updated all the plugins.
I then did a deactivate and reactivation of all plugins – no change.
I disabled all plugins other than Swift Framework – no change.
I switched between Cardinal Child and Cardinal – no change (then switched back again).
I searched mercilessly for other solutions – nothing really applied.
I perused the database to see if anything looked out of order – I didn’t find anything.
I duplicated a problem post, removed rows from the SPB until there were only 11 left – that worked.So it appears that the problem is with SPB or the Swift Framework.
My next reply will have login info so you can take a look around.
OH – one more thing. I’m getting this error in my debug.log even though everything seems to be in the right place:
[29-May-2015 00:24:10 UTC] PHP Fatal error: Call to undefined function sf_aq_resize() in /wp-content/themes/cardinal/swift-framework/content/sf-post-formats.php on line 1009
May 29, 2015 at 1:32 am #179360This reply has been marked as private.May 29, 2015 at 2:06 am #179361Hi @grokism
That is very strange, not sure what is causing that to happen, but I just tested with a default text page, and a very large amount of text (5-10000 words for example) and this showed the exact same issue (SEO data not saving).
This would lead me to believe that there is maybe some limit on the database preventing it from saving all the data, and because of the issue happening with default text on the standard editor, I don’t believe this to be a theme issue.
We’ll check this out a bit further tomorrow.
– Ed
May 29, 2015 at 9:35 am #179479Hi @grokism,
I’m checking this and the problem seems to be related with the status of the post, that previous solution only works when we hit the Publish button. Need to do it for the Save Draft button.
Can you provide us ftp access so we can give a try using your real example?
Use the private reply.Thanks
-RuiMay 29, 2015 at 7:53 pm #179800This reply has been marked as private.May 29, 2015 at 10:17 pm #179815Hi,
Clear the cache and try again. It seems fine now.
Inside page-builder.js locate at plugins/swift-framework/includes/page-builder/assets/js
I replaced this line of code
$('#publish').click(function() {
by this one
$('#publish, #save-post').click(function() {
Thanks for the heads up.
-Rui
July 7, 2015 at 7:58 pm #192535I’m bringing this one back up, as we are having a similar issue again.
One of our editors was working on a post (post ID 45750) and no matter what we did, the “Remove Article Pagination” under Post-Meta kept unchecking itself after saving the draft. This setting just wouldn’t stick.
-I tried one of my previous workarounds (copying the code from the Classic Text Editor, and saving as an empty Swift page builder page), and that did seem to work (the checkbox sticked). But after pasting the code again and saving the draft, the checkbox just unchecked itself.
-Another workaround was not to work in Swift Page Builder, but just making adjustment in the Classic Text Editor, checking the metadata box, and saving. That DID make it stick BUT then the lay-out columns got extremely squeezed in the preview of the post. So that didn’t do the trick either.
-So finally I went looking for the “asset” that triggered this bug of “unchecking the metadata box”. And after some research I found it: the Blank Spacer in our CTA row. I removed that one, checked the metadata box, saved, and IT WORKED. The box checking “sticked” and the lay-out was OK. I did some additional testing, and it seems that adding the Blank Spacer to this blog (doesn’t matter where: inside or outside a column or row), makes that metadata box go “rogue”.
Any thoughts on the cause or a possible fix?
July 7, 2015 at 10:50 pm #192561 -
Posted in: Cardinal
You must be logged in and have valid license to reply to this topic.