Page 1 of 1
Subscribe to the blog
Posted: 09 Jul 2024, 07:20
by sh-fotografie
Hello everyone!
Unfortunately I didn't find anything about my question here in the forum or in the documentation.
In addition to my photo gallery, I have a small blog, especially for my travels.
Is it possible to offer a kind of "subscription button" so that visitors can subscribe to the blog via feed, for example?
I can't find any settings in the panel. But maybe someone has an idea how to implement it.
Thank you and have a nice day,
Susan
Re: Subscribe to the blog
Posted: 09 Jul 2024, 07:59
by trpgforum
Re: Subscribe to the blog
Posted: 09 Jul 2024, 08:48
by sh-fotografie
Thanks Thomas for the tip. A newsletter would be an alternative, but an RSS feed would be much easier. I'm currently thinking about "building" my own RSS feed. Let's see if that works.
Re: Subscribe to the blog
Posted: 09 Jul 2024, 21:28
by mjau-mjau
X3 does already create an RSS feed, but it's for the entire website, not specifically for the "blog".
https://www.sh-fotografie.ch/feed/
I noticed on your website you use a service
feedfry.com, and I see that it can create feeds from a specific page, for example your "blog". It guess it's a paid service if you want the feed to update automatically when you create new blog posts, but there might be other free solutions.
Re: Subscribe to the blog
Posted: 09 Jul 2024, 23:47
by sh-fotografie
hello mjau-mjau,
thanks for your Information. The feed that x3 already creates doesn't seem to actually produce any results. But good to know, I'll take a look at the file structure.
I tried something yesterday. But feedfry.com does not run reliably. Sorry, I should have deleted that. I still tend to create my own txt file for the feed and update it manually. Automatically would be a lot easier, but I don't see a solution other than paid tools.
Re: Subscribe to the blog
Posted: 14 Jul 2024, 06:13
by sh-fotografie
Hello Me again. Unfortunately, I still haven't made any progress. I actually wanted to take a closer look at the feed file of X3, but I just can't find it in the folder structure on my server. Does anyone know where I can find the file? Thank you and best regards Susan
Re: Subscribe to the blog
Posted: 14 Jul 2024, 22:19
by mjau-mjau
sh-fotografie wrote:I just can't find it in the folder structure on my server.
Sorry, but it doesn't work like that. Like most other dynamic website applications, X3 forwards all url requests to the PHP script, which then outputs the response. In your case, the feed response is here:
https://www.sh-fotografie.ch/feed/
However, you won't find any actual files in that location on disk, because the request is dynamic and gets cached. I can't really recommend that you try to edit this, as it's based on twig templates, which need to get re-published, and that's why I didn't mention anything previously.
At this point, I am not entirely sure what you want to achieve. There are no built-in methods in X3 for page-specific RSS feeds. I would first see if there was any external service that do what you require. If you can't find anything suitable, and the task is not too complicated, you can always create some custom feed in PHP (although it would definitely be a job).
Re: Subscribe to the blog
Posted: 20 Jun 2025, 08:07
by nuno.cruz
How did you get to populate like that?
I have enabled mine, but it's completely empty. Is anything else needed to make this work?
Re: Subscribe to the blog
Posted: 20 Jun 2025, 10:57
by mjau-mjau
nuno.cruz wrote:
How did you get to populate like that?
I have enabled mine, but it's completely empty. Is anything else needed to make this work?
I checked your website. It's technically working, but your server or some unknown mechanism, is adding empty lines at the top of the document:
... which in turn causes the XML to become invalid.
The output is actually correct, except the empty lines is causing invalid XML declaration.
Could you try to click SAVE in settings and see if it automatically gets corrected? It's possible this might be related to PHP version, although it works fine on my server, which is also PHP 8.4:
https://demo.photo.gallery/feed/
Re: Subscribe to the blog
Posted: 23 Jun 2025, 04:53
by nuno.cruz
I have tried it before, saving by enabling and disabling again and that didn't fix it.
Re: Subscribe to the blog
Posted: 23 Jun 2025, 05:23
by mjau-mjau
nuno.cruz wrote:
I have tried it before, saving by enabling and disabling again and that didn't fix it.
It could be related to mbstring function as noted in your other post. Or it could be related to your PHP version, although that would be unusual. In either case, it's something coming from your server. If you check our
showcase of X3 websites, all of them have working /feed/ links without the empty space on top.
If you are testing, after enabling MBSTRING or changing PHP version, please click SAVE in settings just to make sure cache gets refreshed.
The only to further diagnose if there is some error or warnings, would be to check your server error log. That might be in your hosting control panel, or you may need to check with your host.
Re: Subscribe to the blog
Posted: 23 Jun 2025, 05:35
by nuno.cruz
It was indeed the mbstring missing!
Thanks