Tagged: advanced layout builder, ALB
-
AuthorPosts
-
January 15, 2019 at 5:26 pm #1054185
Compare REST API URLs:
Classic Editor Post – https://wels.net/?rest_route=/wp/v2/dev-daily
Advanced Layout Builder Post – https://wels.net/?rest_route=/wp/v2/bible3This happened after Enfold Update 4.5.2
The RSS feed shows the content:
https://wels.net/category/bible3/feed/It appears that as soon as the REST API discovers ALB it bombs. How can this be fixed to work again?
Our Mobile App can’t load content because of this REST Api issue.- This topic was modified 5 years, 11 months ago by welswebmaster. Reason: Wrong technical term
January 22, 2019 at 1:00 am #1056949Hey Julie,
That happens because we are loading the shortodes…
The best would be to have different pages who are only for the mobile application and they do not load ALB at all…Best regards,
BasilisJanuary 22, 2019 at 8:28 pm #1057430Hey Basilis,
Interesting response in that ALB shortcodes is the cause, but no plans to rectify it other than force the user to recreate content?January 26, 2019 at 12:32 am #1058958Hi,
You can take a look here
https://github.com/WP-API/WP-API/issues/2962if that is something to help you out.
Best regards,
BasilisJanuary 30, 2019 at 11:47 am #1060438Hi there,
I think we are facing the same problem.
After switching from WordPress 4.9.9 to WordPress 5.0.3 (both using the same Enfold version 4.5.2) the WP-API doesn’t deliver the rendered HTML content anymore. This only happens while using the ALB and does affect both posts and pages.Example API response using WP 4.9.9
…
“content”: {
“rendered”: “<div class=\”flex_column av_one_full flex_column_div av-zero-column-padding first \” style=’border-radius:0px; ‘> …”
}
…Example API response using WP 5.0.3
…
“content”: {
“rendered”: “</p>\n”
}
…Any suggestions on this or the underlying cause of it?
Thanks in advance.February 4, 2019 at 3:07 pm #1062712Hi,
Thank you for reporting this – and sorry for the problems.
I opened a bug issue for that in our dev repo.
Cause is, that Gutenberg saves changes via REST API calls. We probably missed to create output of ALB content on regular calls.
We try to fix it asap.Best regards,
GünterFebruary 4, 2019 at 3:26 pm #1062714Günter vielen Dank
February 5, 2019 at 5:58 pm #1063237Hi,
I’ve found a possible solution. Can you please replace
enfold\config-templatebuilder\avia-template-builder\php\shortcode-template.class.php
with this file:
Do not forget to make a backup of the original file for a fallback.
The changes can be found in function shortcode_handler_prepare line 315 ff.
I asked Kriesi to recheck that these changes do not have a negative impact – if not it will become part of the core.
Best regards,
GünterFebruary 5, 2019 at 7:07 pm #1063253Günter
Looks like content section is still missing data. Title and excerpt are good.
Since the site was not affected (crashed) – I’ll leave it for you to see. Take a look: https://wels.net/?rest_route=/wp/v2/bible3
Thanks for your continued support.
jFebruary 6, 2019 at 2:20 pm #1063629Hi,
Thanks for the feedback.
Seems that WP must have changed something in the REST API with 5.0.
I uploaded a new fix at https://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_4_5_3/shortcode-template.class.php
that works on my dev server.Changes can be found in function shortcode_handler_prepare line 315 ff.
Can you please check if they work for you also.
Best regards,
GünterFebruary 6, 2019 at 3:07 pm #1063649Hello Günter,
thank you for the response and support.
I tried your last fix and it seems to work as expected. The “rendered” part now holds the content again.
If I notice any inconsistencies I will post again. For now everything seems fine.Best regards
February 6, 2019 at 3:37 pm #1063661Close! While the JSON looks good now (thank you), the GraphQL is still not working.
GOOD – https://wels.net/wp-content/uploads/kriesi/JSON.jpg
BAD – https://wels.net/wp-content/uploads/kriesi/GRAPHQL.jpgSo, our mobile app has mixed results with the GraphQL not working with ALB content. I’ve reverted to the original since the majority of our mobile app pulls via GraphQL.
jFebruary 6, 2019 at 3:56 pm #1063670Hi,
Can you try to replace (around line 353)
if( defined( 'REST_REQUEST' ) && REST_REQUEST && ( $post instanceof WP_Post ) )
with
if( $post instanceof WP_Post )
I uploaded the changed file.
Best regards,
GünterFebruary 6, 2019 at 4:05 pm #1063675Yeah! We have a complete solution, Günter. Thank you so much. All is GOOD.
Enjoy your day. Close this ticket as resolved.February 6, 2019 at 4:21 pm #1063689 -
AuthorPosts
- The topic ‘REST API missing content after title if using ALB in a POST’ is closed to new replies.