Ayemae / Grawlix-Webcomic-CMS

PHP-based webcomic CMS
22 stars 5 forks source link

RSS Feed not being seen by Readers on new installation #8

Closed Darwin1969 closed 2 years ago

Darwin1969 commented 2 years ago

I am in process of putting a Grawlix site together and I noticed as I was working with the RSS button for the site that my reader will not see the available feed.

I am using the extension /rss?id=1 at the end of the URL and Feeder says they can't find it.

I also noticed as I was mining the code in the that there is no mention of RSS. For example another site with a different CMS has the following: in it's header. I am not seeing that in the Header for this build. I am uncertain whether it's necessary with this CMS, but something isn't working properly with the relationship between the RSS and the ability to be read.

I have checked my reader with other CMS's and it seems to be working properly.

Please advise.

Than you for your time

Sincerely, Darwin

eishiya commented 2 years ago

I think you might've forgotten to include whatever was in the header that you found in one CMS and not in Grawlix. AFAIK there's no header for RSS, neither in the RSS XML nor as a special HTTP response header, so I'm curious to see what header you're talking about.

I've tested a few Grawlix sites' RSS with a couple of readers and had no trouble, though I haven't tried Feeder. The feeds also pass the RSS board's validator (https://www.rssboard.org/rss-validator/).

Edit: Ah, but it is apparently being served with text/html MIME type, is that the header you meant? The code should be sending a Content-Type: application/rss+xml header, but maybe that's not working, I'll look into it.

Darwin1969 commented 2 years ago

I've tested a few Grawlix sites' RSS with a couple of readers and had no trouble, though I haven't tried Feeder. The feeds also pass the RSS board's validator (https://www.rssboard.org/rss-validator/).

Edit: Ah, but it is apparently being served with text/html MIME type, is that the header you meant? That is something we can probably fix.

Huh, I thought I plugged in the information in my original post... now I'm not seeing it. It seems to have erased it. :( < link rel="alternate" type="application/rss+xml" title="RSS" href="/rss" > Thank you for the validator, the feed does have errors and I've included the screen shot below.

The site I'm building right now is https://tuppenceforstarlight.spiderforest.com The first image is of the header in another CMS... I thought the title would show, apologies. Alt CMS Tuppence RSS result validation

eishiya commented 2 years ago

The <link rel="... stuff is just for RSS auto-discovery and has nothing to do with the feed's validity.

The second image is more concerning: you've got a 500 error on the site, which means the page isn't loading at all because the PHP code generating it is crashing or something else is happening. The RSS is invalid because it doesn't get a chance to be generated at all xP The URL you linked doesn't work for me, I get a Server Not Found error - that means the server is just returning nothing at all, it's beyond simply crashing... When I run your RSS link through the validator, it returns a similar sort of error - not even a 500, it just fails to connect at all. That's probably some sort of issue with your server that you'll need to take care of. I've passed this on to Ayemae, who I believe is your server admin. You posted the wrong URL xP It should be stardust, not starlight. So we're back to the 500 error: Grawlix is crashing when generating the page. Without error reporting, we can't narrow down why, so you'll need to check your error logs or enable printing errors.

In better news, I've updated (my fork of) Grawlix to send the correct content-type header, and (re)opened a pull request to merge that and other fixes into this main repository. Though given the problems you've got going on now, I doubt that'll be enough to fix it :'D

Darwin1969 commented 2 years ago

Yup definitely the wrong url there. Sorry about that. (I at least validated the right URL).

As far as the fix you implemented on your end, which file should I redownload to apply to this site build?

Forgive my question here, as I am a site-building volunteer rather than a full blown developer. How would I go about turning printer errors on, or finding the error logs?

eishiya commented 2 years ago

Before we apply any patches, let's try to see where the 500 error is coming from.

I don't know where error logs are on your server, but you can turn on error display by placing ini_set('display_errors', 1); on line 2 (i.e. the line after <?php) of the file that generates the RSS, which is _system/GrlxPage2_RSS.php

After you've done that, any errors and warnings output by PHP should show up on the page. Make sure you view the RSS feed by going to it directly, e.g. in your browser, not by trying to open it in a feed reader.

eishiya commented 2 years ago

Looking at the site again, I noticed the Archive is broken too. I think you might actually be experiencing the exact same issue as #7 - the XML that stores the options for your comic got messed up because newer versions of PHP behave differently. If that's the case, then your "Edit book info" page in the admin panel will also be blank. If you follow the steps in #7, you can update Grawlix to the fixed version, as well as fix the broken XML in your database, and that should fix all of these problems.

If you're not sure how to format the XML, feel free to post it here and I'll give you a fixed version. Or you can copy+paste the one from that issue, and just update your archive and RSS settings to be what you want.

eishiya commented 2 years ago

Since @Darwin1969 reported this issue is solved by the fix from #7, I'm closing this issue.