• Resolved DerBlaumagier

    (@derblaumagier)


    Hi,

    When using Memphis Documents Library, our RSS feed does not work and shows a blank page with the following message:

    This page contains the following errors:
    
    error on line 1 at column 32: XML declaration allowed only at the start of the document
    Below is a rendering of the page up to the first error.

    Disabling Memphis fixes this issue and returns the RSS feed to normal. Any ideas how to fix this or what would cause this?

    Update:
    This may be the headers Memphis is sending to the page. When I comment out the line

    if(!headers_sent()) add_action('send_headers', 'mdocs_send_headers');

    in memphis-documents.php, it returns a different error:

    This page contains the following errors:
    
    error on line 39 at column 62: EntityRef: expecting ';'
    Below is a rendering of the page up to the first error.

    Followed by this below it (things in brackets are censored to protect company identity):

    <Intranet name> <intranet URL> <Headline> Wed, 14 May 2014 10:40:10 +0000 en-US hourly 1 http://ww.wp.xz.cn/?v=3.9 Password Reset Guide <intranet URL>/password-reset-guide/ <intranet URL>/password-reset-guide/#comments Tue, 06 May 2014 11:12:16 +0000   <intranet URL>/password-reset-guide/

    https://ww.wp.xz.cn/plugins/memphis-documents-library/

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

    (@bhaldie)

    Yes you are very right, and this issue should be fixed in version 2.4 by removing IE compatibility mode action.

    I will be released this version today and I hope this issue will be resolved.

    Thanks for the report.

    Thread Starter DerBlaumagier

    (@derblaumagier)

    Thanks for the update. I’ll leave this open and get back to you after the update.

    Plugin Author bhaldie

    (@bhaldie)

    Yes please let me know if this solves your problem.

    Thread Starter DerBlaumagier

    (@derblaumagier)

    Cheers for the update, that has fixed the initial problem, the “XML Declaration” error.

    The second error is still happening however. It seems that whenever the first mdocs post ends, it throws this:

    error on line x at column 62: EntityRef: expecting ';'

    and does not load the rest of the page. Everything before that (so if i do a normal post), loads fine!

    Plugin Author bhaldie

    (@bhaldie)

    Could I see this error on your site, it would make debugging a lot easier.

    Thread Starter DerBlaumagier

    (@derblaumagier)

    It’s a company intranet site I’m afraid so you won’t be able to have access to it, sorry.

    The only way I can describe it is when an mdocs post finishes loading the last piece of the first mdocs post it encounters, the description, it flags that error as if there was something at the end of the description thing that didn’t close a tag.

    The best I can do is show you the page source to try give you an idea:

    http://i.imgur.com/7YtKBvT.png

    Plugin Author bhaldie

    (@bhaldie)

    Thanks for the screenshot that is helpful. I will look into this problem and get back to you.

    Plugin Author bhaldie

    (@bhaldie)

    Hi,

    I have a possible solution for you. If you could replace all contents of the function mdocs_social_scripts() found in the file mdocs-social.php with this:

    ?>
    <div id="fb-root"></div>
    <script type="text/javascript">
    //FACEBOOK LIKE
    (function(d, s, id) {
    	var js, fjs = d.getElementsByTagName(s)[0];
    	if (d.getElementById(id)) return;
    	js = d.createElement(s); js.id = id;
    	js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&status=0&appId=12345";
    	fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));
    //TWITTER TWEET
    !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
    //GOOGLE +1
    (function() {
      var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
      po.src = 'https://apis.google.com/js/plusone.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
    })();
    </script>
    	<?php

    Basically I replaced the & symbol with &. Hope this fixes your problem.

    Cheers.

    Thread Starter DerBlaumagier

    (@derblaumagier)

    Cheers, that has fixed that but now it’s showing the following error! (yay! errors!)

    error on line 56 at column 8: Opening and ending tag mismatch: input line 0 and h2

    It also has the same output as before except it adds the social script in the output at the end with the text for the download button, and in the source it shows that the text refers to:

    Social script stuff</script>
    <div class="mdocs-post=button-box">
    <h2
    <a href="URL to document" title="document title">Document Title</a>
    <input type="button" onclick="mdocs_download_file('5005','5004');" class="mdocs-download-btn" value="Download"></input>
    </h2>
    </div>
    Plugin Author bhaldie

    (@bhaldie)

    Looks like on line three the <h2 doesn’t have a closing > that might be the problem. Looking at my code it is there so I not sure why it’s not?

    it may have to do with the link to the document which would contain ‘&’ which caused your problem before.

    you could also try this change the tag right after the <h2> tag of the file mdocs-file-info-large.php line 45 to this:

    <a href="<?php echo htmlspecialchars($the_mdoc_permalink); ?>" title="<?php echo $the_mdoc['name']; ?> "></a>

    Thread Starter DerBlaumagier

    (@derblaumagier)

    Heya, sorry for the late reply.

    That didn’t fix it I’m afraid, it still shows the same thing. We’ve chosen to just hide mdocs posts from the RSS feed since we don’t want those posts getting in the way of news posts.

    Plugin Author bhaldie

    (@bhaldie)

    Well at least you got it working… I will still keep looking for the root cause. It is very curious to be the the <h2 is not formed properly.

    I will let you know if I find anything

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

The topic ‘Memphis Breaks RSS Feed’ is closed to new replies.