July 12, 2017 at 5:38 pm #130532
Thank you for. I took another pass today and believe I understand the problem now.
The problem is that Cornerstone overwrites the post_content outside of the normal hooks using AJAX. Landing Pages misses this update call and does not set the new cornerstone shortcodes into the variation content settings object like it does with traditional content data.
Could you ask the developer to add a do_action hook to class-save-handler.php that will allow me to ‘read’ the post_content during a conerstone save and ‘store’ it into the correct variation content setting value?July 17, 2017 at 8:08 am #130595
I have the response from them:
If cornerstone overwrites the post_content, then it should display the cornerstone content instead of your landing page. Plus, the_content() is the wrapper of post_content but with filters. So yes, cornerstone should overwrite the post_content but it’s not even happening on those pages.
And the more I think it, it will not really work since your post types and land pages doesn’t even utilize the WordPress default editor. And cornerstone is only applicable for WordPress default editor, not to any editor added by a plugin.
And it’s not do_action(), it’s apply_filters(), like mentioned before the_content() is a wrapper for post_content where filters are being called. Which means, if your plugin doesn’t even utilize WordPress default editor and the_content(), then it’s no use if you use do_action() nor apply_filters().
The only solution is to make the plugin use the default editor and add the_content() function in their landing pages. You can’t do the shortcut and call post_content because the shortcode processing happens within the filters.
Thanks.July 17, 2017 at 5:33 pm #130602
Could I get in touch with the developer? I can get the contents of the_content to display correctly if I know how to save them into my variations object. I just can’t find how to hook into Conerston builder’s AJAX save request to detect the the Cornerstone content and additionally save it elsewhere.
If I could get direction on where to intercept the save process I can fix the integration.July 18, 2017 at 11:41 am #130611
Of course! Are you comfortable logging in as me on their support forum and taking over the case with them? If so I’ll post the logins and the relevant login instructions in a private message.
Thanks!July 18, 2017 at 3:44 pm #130614
Yeas no problem at all. Sounds good.July 19, 2017 at 9:54 am #130621This reply has been marked as private.July 21, 2017 at 7:33 am #130661This reply has been marked as private.July 21, 2017 at 6:56 pm #130674
I think I have an integration built into your theme, will you give it a check? I’ll start making an extension with what I have built already.July 25, 2017 at 8:53 am #130706
Thanks for this. Seems like progress, we’re able to load the builder now on landing pages, but unfortunately, to us, it still appears that it isn’t saving any of the changes created inside of the builder.
We’re now able to edit landing pages using the cornerstone builder and it says it saves, but it doesn’t. Changes disappear on the from the cornerstone builder immediately after you click save.
ThanksAugust 2, 2017 at 10:04 am #130777
Just checking in on this. I haven’t seen any response to the Cornerstone crew in almost 2 weeks. Is everything ok?August 2, 2017 at 8:11 pm #130791
It’s a tough one. I did some more work on it and, maybe, I have it solved. Will you run a round of tests from your side and confirm?
If it works I’ll use the work I did inside your theme’s functions.php file to make an extension.August 2, 2017 at 8:47 pm #130793
Sure thing. Happy to. Thanks for taking the time to work on it.
Please let me know where I should be testing?August 3, 2017 at 12:12 pm #130799
I’d create a new landing page and then create a few variations using corenerstone and see how it feels.August 9, 2017 at 10:57 am #130850
Sorry for the delay. This works perfectly! Thank you again for taking the time to figure it out. It is much appreciated.
JoshuaAugust 9, 2017 at 4:32 pm #130860
Okay I’ve switched out the code in functions.php with an extension. Looks to still load for me. Will you check one more time and see if all is go? Then I’ll release the integration for free.
The topic ‘[Developers’ Hangout] Cornerstone Builder & Landing Pages’ is closed to new replies.