Support » Plugin: Memphis Documents Library » Document Library Preview is showing page source

  • Resolved dwlorimer

    (@dwlorimer)


    The Document Library Preview is showing the page source html, instead of the document to preview.
    http://www.skypeug.com/document-library/
    If you click download, the download works just fine. It’s only the preview that has the problem.

    However, on our staging site, the preview is working fine.
    http://ucusergroup.staging.wpengine.com/document-library/
    As best I know, the plugins, settings, etc are the same on both sites.

    Here’s a screenshot of the settings on both staging and production. We had to implement some of the fixes because of conflicts. But, as I said, these settings are the same on both sites.
    https://ibb.co/hC5T2F

    Do you need any further information to help us get this figured out and fixed?

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author bhaldie

    (@bhaldie)

    looking at the site with the issue, I see you have a javascript error that will cause the preview not to work.. take a look at your sites jQuery.js file there seems to be some issue.

    I’m not seeing any javascript errors in the console when I load the page or click on preview. Would you mind copying the ones you’re receiving into a message for me?

    Plugin Author bhaldie

    (@bhaldie)

    here is the error that I am seeing “error — jquery.js:2:12788Error: Syntax error, unrecognized expression: [data-button-scroll”

    I have tried everything — I have stopped loading all custom .js scripts (outside of wordpress core); I have replaced the current jquery.js version on the site with a fresh copy of version 3.2.1.

    I never see the error in the console that you see, in any browser (Chrome, FF, and Edge), and none of these changes have changed the fact the it loads the page source every time.

    So I made a fresh copy of staging from production, and …. it works great on staging, but not on production.

    We use wpengine. So there must be something that runs on production that does not run on staging, b/c the sites are identical copies now, and we still have the issue.

    If we figure it out, I’ll let you know. This is the strangest thing.

    Plugin Author bhaldie

    (@bhaldie)

    keep me posted and let me know if it is something I can fix on my end.

    Is it possible that this could be caused by session information not being set properly?

    If I use the pop-out link, it loads a url like this that looks exactly the same:
    https://docs.google.com/viewerng/viewer?url=http://www.skypeug.com/?is-google%3D2266&mdocs-session=9441f8a01ed8f103c4107132114168d2

    Edit – after poking around more, I see that the document is set by the id, not the session, as this link is the same:
    https://docs.google.com/viewerng/viewer?url=http://www.skypeug.com/?is-google%3D2266

    How does this code work? Is something not processing the is-google variable?

    • This reply was modified 3 years, 3 months ago by dwlorimer. Reason: found new information
    Plugin Author bhaldie

    (@bhaldie)

    The is-google variable just lets mdocs know to display the preview using the google docs preview and what file to display. The docs-session just makes sure that the preview shows the most recent document not a cached version.

    so in your example it should display the file associated with the file id 2266.

    When i click the link is is displaying the html of your site, which tell me that something is causing the mdocs download function to break. I would suggest turning off all other plugins and see if this functionality works then enabling all plugins on at a time until the problem comes back.

    I cannot do that on our production site. And our staging site, as I indicated, works perfectly fine, even as a fresh copy of the production site. It’s all the same plugins.

    The download button works fine, which is using a similar file reference: http://www.skypeug.com/?mdocs-file=2266
    It’s only the preview reference that isn’t working.

    I guess we’ll just turn previews off for now. I’m guessing it’s some type of conflict with wp-engine or something.

    Thanks.

    Plugin Author bhaldie

    (@bhaldie)

    u can’t disable wp-engine for a quick test on your production site to confirm?

    No, the site is hosted by WP-Engine and managed by it, so they’re impossible to separate. The staging site is also, but WP-Engine doesn’t run as much security on the staging site.

    Plugin Author bhaldie

    (@bhaldie)

    no problem… just thought I’d ask for a confirmation.

    On a side note if you use safari to access your site it doesn’t work, you get javascript errors.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Document Library Preview is showing page source’ is closed to new replies.