No access to pages
Closed this issue · 21 comments
Hi Colin,
I'm tryin' hyblog but can't access any custom pages: https://zart.frittiert.es
There should be a Now
and a Test
page.
Hey there. Thanks for trying it out. Sorry you're having problems.
Looking at your site I see two 'pages' links in the menu tray but both give 'forbidden' errors. When you added the pages were the .md files created properly? These should have been created in a folder called 'pages' in the root of the site.
Yes, the test.md came with the installation, but caused the forbidden
error from the beginning. I created the other one with addpage.php
and it should be called Now
.
If there was a forbidden error on the test.md page then it sounds like a permissions issue on the pages folder (weird) so you might want to check that.
Do you have an error log in the home directory? If so can you attach it so I can have a look.
I did notice a couple of issues with the logic in addpage.php so have uploaded a new version of that but it's nothing that would cause the forbidden error. You will need to grab that updated file though for things to work properly.
The rights are the same as for the posts (755 folders, 644 files).
The new version of addpage.php
is not yet in the repo.
Ah, my mistake. I had the GitHub app open but happened push the commit. You should now be good.
Perhaps there is something more wrong with my installation. The navigation above the footer is also not displayed. Let me start from the beginning.
The same errors occur. 😕
Let me do a test install and get back to you.
I've just added a new version of hyblog.php which should fix the footer issues but I'm also getting the pages error on a clean install. I need to work out what's different between my test install here and the repo.
Many thanks for your efforts!
I'm sorry if it's annoying but the navigation is still not displayed.
OK. I think it was making too many assumptions on file paths etc. so I've done a re-write. I've tested it in a couple of different scenarios (root of a site, sub-folder, etc.) and it seems to be working. 🤞
Let me know how it goes.
Thank you like crazy! I'll keep trying tomorrow.
Unfortunately, the navigation links still do not appear. Could it be that something is missing in line 73 of footer.php?
The pages are now displayed correctly, but there is still a small bug: If I edit a page but cancel this step, I am redirected to the page with a trailing slash, which leads to this error:
Not Found
The requested URL was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
And then I noticed that the page titles are not displayed in the admin area. Instead it just says 'Pages', similar to the problem yesterday in the menu:
The newsfeed also looks as if it wasn't intended that way.
<rss xmlns:source="http://source.scripting.com/" xmlns:now="https://nowns.work" version="2.0">
<channel>
<title>
<?php echo NAME;?>
</title>
<description>
Posts from
<?php echo NAME;?>
</description>
<link>https://zart.frittiert.es/</link>
<lastBuildDate>Sun, 03 Dec 2023 09:06:28 GMT</lastBuildDate>
<cloud domain="rpc.rsscloud.io" port="5337" path="/pleaseNotify" registerProcedure="" protocol="http-post"/>
<generator>hyblog</generator>
<source:account service="hyblog">
<?php echo NAME;?>
</source:account>
<language>en-GB</language>
<now:title/>
<now:link>https://zart.frittiert.es//</now:link>
<now:content>
<![CDATA[ ]]>
</now:content>
<now:timestamp>Thu, 01 Jan 1970 01:00:00 +0100</now:timestamp>
</channel>
</rss>
Thanks for the PR. Stupid mistake 🤦♂️ Also some stupid mistakes in rss.php.
I forgot to make the same change re: pages in admin as elsewhere so that should now be okay.
The nav links will only appear once you have older/newer items, If you only have posts in for today then there will be no back link. You can check this by duplicating the .md file for today and renaming it to yesterday.
Various files updated so please update and test again. Sorry for the issues, thanks for your patience and thanks for helping me get it locked down.
Still no navigation: https://zart.frittiert.es/?date=2023-12-01
Or does hyblog register when the markdown files were created, regardless of the file name?
It's done purely by filename: yyyy-mm-dd.md
I've tweaked hyblog.php 🤞
Unfortunately still no navigation. I'll create another article tomorrow, maybe it is accidentally stuck at this point.
I'll also wipe one of my test installs and redo it from the repo to see what happens. Do t know why I can't reproduce the problem.
I had to reinstall all because I could no longer log in. No idea why. Then I copied my existing 2023-12-dd.md files into the folder /posts/2023/12/
and created a new article but, as before, the previous/next navigation is not displayed although I can call up each article via URL.