Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal Error: Using Recent Entries widget in Divi #914

Closed
zackkatz opened this issue Aug 19, 2017 · 2 comments
Closed

Fatal Error: Using Recent Entries widget in Divi #914

zackkatz opened this issue Aug 19, 2017 · 2 comments

Comments

@zackkatz
Copy link
Member

zackkatz commented Aug 19, 2017

Fatal error: Class 'GravityView_View' not found in …/wp-content/plugins/gravityview/includes/class-gravityview-entry-list.php on line 177

I imagine this is related to Divi widget pre-rendering in the admin; the needed files aren't loaded in is_admin() context.

Should we load template files all the time? Or just prevent fatal errors in Divi for now? Thoughts, @soulseekah?

See HS#10461

┆Issue is synchronized with this Asana task

@soulseekah
Copy link
Contributor

This is the same issue as in https://secure.helpscout.net/conversation/378149237/9534/

The fix is the same:

add_filter( 'et_pb_admin_excluded_shortcodes', function( $shortcodes ) {
    $shortcodes []= 'et_pb_sidebar';
    return $shortcodes;
} );

This prevents sidebar shortcodes to be rendered.

We can include the code and only trigger it if we detect any of our widgets in the sidebar. This is the easiest approach, previews work (they are done in an iframe it seems), and I'm not really sure what the drawback is, I can't figure out what stops working though.

I know Yoast SEO stops seeing the rendered sidebar, which we determined as fine since sidebar content is not really important for SEO (right?).

The more thorough and much harder fix would be to make things work, allowing internal rendering for wherever it is needed. A path we'd have to take once we find out that our quick fix impacted something, hard to tell with tens of thousands of plugins out there.

@zackkatz
Copy link
Member Author

We can include the code and only trigger it if we detect any of our widgets in the sidebar. This is the easiest approach, previews work (they are done in an iframe it seems), and I'm not really sure what the drawback is, I can't figure out what stops working though.

Okay, let's go ahead with that approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants