• Resolved cschaub

    (@cschaub)


    So, the preview loads in exerpts of various post types. If that post type uses a plugin (like sharethis) the javascript will break with various hard errors. This kills the querywrangler admin interface. I’ve seen it with ShareThis and AllInOneVideoPack modules.

    So, is this the fault of the modules that are loading jquery within the admin context? Or should querywrangler be more defensive — not sure how that would be possible though.

    https://wordpress.org/plugins/query-wrangler/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jonathan Daggerhart

    (@daggerhart)

    I’m not sure that it’s anyone’s fault necessarily. It’s fairly unexpected to load posts on the admin screen.

    I could probably be more defensive when loading posts in the preview by removing some common filters other plugins use for posts, but that would cause the preview to be less accurate. I’ll look for a middle-ground solution.

    Thread Starter cschaub

    (@cschaub)

    One simple solution would be to have an admin setting to not automatically preview the view, leave it unchecked by default if an admin setting says so.

    editors/views/query-edit-views.inc

    Right now, it’s checked by default which causes the blowup. A user could just turn off the auto-preview and then preview in another tab as a non-admin user, for problematic content types.

    Plugin Author Jonathan Daggerhart

    (@daggerhart)

    I put a new setting in 1.5rc21 to allow for disabling the live preview by default. Please let me know if you have any issues.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Preview in admin screen breaks JS’ is closed to new replies.