Archives widget not showing

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
schlartibardfast
Posts: 3
Joined: Thu Jun 13, 2024 2:28 pm

Archives widget not showing

Post by schlartibardfast » Thu Jun 13, 2024 2:48 pm

I've been running Flatpress 1.2 on a pi for a couple of years. I've got it set up with a Right Bar containing Search and an Index.

I'd like to add a list of posts and thought I'd try to add the Archives widget to see if that was what I needed. On the Widgets/Manage Widgets page I've dragged "Archives" from "Available Widgets" to the Right Bar and Saved Changes.

The Right Bar on the Manage Widgets page now shows "Archives" under the entries "SearchBox" and "BlockParser: menu" BUT this widget does not show on the Right Bar of the site itself - it just shows the pre-existing search & menu.

I have rebuilt the index and tried a different browser in case it was a cache issue but still no good.

Any suggestions or clue most welcome :-)

Edit: looking at the page source via the browser (Opera), there are a bunch of links (link rel="archives" title="January 2024" etc.) in a section commented as <!-- archives --> but in the Header of the HTML, not in the Body.

User avatar
fraenkiman
Posts: 314
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: Archives widget not showing

Post by fraenkiman » Fri Jun 21, 2024 7:29 pm

Hello schlartibardfast,

Welcome to FlatPress and the support forum.

The link-elemet archive actually belongs in the head, not in the body. This is not an error.

I am not aware of any problems with the archive widget since FlatPress 1.2.1. Could there be a problem with the language files? Which language have you set in FlatPress?
Does the widget appear if you set a different language?
Maybe you want to update to FlatPress 1.3.1?
Are there any server-side errors in the error log?

Best regards
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

schlartibardfast
Posts: 3
Joined: Thu Jun 13, 2024 2:28 pm

Re: Archives widget not showing

Post by schlartibardfast » Wed Jul 03, 2024 3:26 pm

Many thanks for the reply.

The language (per "Options" i.e. admin.php?p=config) is "English (US)"

I do not understand why the archives links are in the head when "link rel="archives"" and their titles appear *only* in the head - there is no reference or link at all in the body so they appear to be inaccessible to the page visitor.

Changing the language (to Deutch) has no effect other than changing the text for "Read More" etc into German. Also removing the Widget does not remove the <!-- archives --> section in the header.

I'm also having issues attempting to edit Statics (I thought I'd create a manual list of blog posts as a static and then link this in the Menu static). I can create a static and edit its contents but then suddenly I can't anymore: I write new content in the content area, click preview and the preview doesn't show up in the preview area. Or sometimes it does but when you click publish and then revisit the page the new content has gotten lost. So maybe a Write issue? But it does allow you to delete the static. I'm not getting any errors flagged - it just don't work properly.

This is running on a Raspberry pi which isn't showing any other issues (and has been doing basic blogging for several years).

I know that 3.1.1 is the latest version but I don't want to upgrade *anything* unless there is a pressing need to (e.g. big security issue, etc). Upgrades are almost always a sea of pain and life's too short...

I should explain that I'm an electronics engineer not a software developer/debugger so I'm getting more than a little frustrated and wondering why I ever invested all this time in Flatpress instead of staying with the hand coded html that I used before :-(

Any thoughts/helpful hints/etc gratefully received...

User avatar
fraenkiman
Posts: 314
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: Archives widget not showing

Post by fraenkiman » Thu Jul 04, 2024 9:06 pm

Hello schlartibardfast,
schlartibardfast wrote: Wed Jul 03, 2024 3:26 pm This is running on a Raspberry pi which isn't showing any other issues (and has been doing basic blogging for several years).
Cool, that's exactly what I do. My Pi4 runs behind a Fritz!box.
However, I recommend using an SSD instead of a micro SD as a data carrier. MicroSD cards put the long-term reliability of Raspberry Pi-based systems to a severe test in continuous use.
schlartibardfast wrote: Wed Jul 03, 2024 3:26 pm I do not understand why the archives links are in the head when "link rel="archives"" and their titles appear *only* in the head - there is no reference or link at all in the body so they appear to be inaccessible to the page visitor.
I am not a web designer. So I'll try to explain it to you simply in my own words:

The link element is used to define a relationship between individual "archive" documents and is only written within the header area (<head>). The link element is also not intended for the website visitor, but for the crawler of a search engine. The crawler uses it to feed the search engine with the creation date of the entry.
In the case of FlatPress, the archive plugin generates

Code: Select all

<link rel="archives" title="January 2024" href=..
. for search engine optimization. So that your entries rise in the ranking.

The widget generates such HTML code:

Code: Select all

<div id="widget-archives">
			<h4>Archiv</h4>
			<ul><li class="archive-year archive-y2024"> <a href="https://localhost/flatpress-master-1426/index.php/2024/">2024</a><ul><li class="archive-month archive-m07"><a href="https://localhost/flatpress-master-1426/index.php/2024/07/">Juli </a></li></ul></li></ul>
			</div>
schlartibardfast wrote: Wed Jul 03, 2024 3:26 pm I'm also having issues attempting to edit Statics (I thought I'd create a manual list of blog posts as a static and then link this in the Menu static). I can create a static and edit its contents but then suddenly I can't anymore: I write new content in the content area, click preview and the preview doesn't show up in the preview area. Or sometimes it does but when you click publish and then revisit the page the new content has gotten lost.
The behavior is strange.
Remote diagnoses are difficult here. Therefore, reduce to standard:
1. deactivate all plugins that are not part of the standard distribution.
2. then switch to the standard Leggero v2 style.
3. then clear the template cache again
4. now see if the archive widget is displayed

Why all this? It is possible that a subsequently activated plugin is not working properly and is interfering. It is possible that a template file of the theme you are using is defective.

If this works now, gradually start up your own things again. First your own plugins - one after the other. After each activation, check whether the archive widget is still displayed.

Then activate your style again. Then check here too whether the archive widget is still displayed.
schlartibardfast wrote: Wed Jul 03, 2024 3:26 pm The Right Bar on the Manage Widgets page now shows "Archives" under the entries "SearchBox" and "BlockParser: menu" BUT this widget does not show on the Right Bar of the site itself - it just shows the pre-existing search & menu.
There may just be an operating error here or the translation is.... Move the widgets you want to display from the right to the left side using drag & drop and then save the settings. Wiki ->
schlartibardfast wrote: Wed Jul 03, 2024 3:26 pm I should explain that I'm an electronics engineer not a software developer/debugger
I don't think anyone here is a professional software developer/debugger ...except Arvid. The trained carpenter supports the hard and software developers of new Fritz!chens in Berlin. Everything I spread here are experiences, paired with dangerous half-knowledge, as relaxation after work :D.

Shaka, we'll manage.

Best regards and have a nice weekend
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

schlartibardfast
Posts: 3
Joined: Thu Jun 13, 2024 2:28 pm

Re: Archives widget not showing

Post by schlartibardfast » Fri Jul 05, 2024 2:31 pm

Hi Frank & thanks very much for the detailed response :-)

I'll look into SSD instead of micro SD (but don't think I've got USB3 so it might be too slow). Anyway, I keep good backups of /var/html so should be easy to rebuild if it dies.

Thanks for the explanation of Archives; I had thought that it was to provide a list of prior blog posts that could be linked in the menu (which is what I wanted to do).

I've managed to get rid of it now: dragging it to the Delete on the RHS of the Widgets page did not work reliably - even after it said Changes Saved it re-appeared on reloading the page - and took several attempts. Even then it was still generating the links in the header until I disabled the plugin.

I've now disabled the one plugin that was enabled that wasn't in the standard distribution and hit the "Purge theme and templates cache". I'm not keen to restore the default template as that would change the blog appearance. In any case, I've generated a Blog Index by manually coding the absolute urls into a static file (blog_index.txt) in /var/www/html/flatpress/fp-content/content/static/ , edited using the pi text editor over vcn and then manually edited the menu.txt to include it in the menu.

That seems to have a usable work-round for now and I'll see how it goes. The normal blog function seems fine.

As a fallback I'll snapshot the existing blog with a wget so I can move it to a static cms (Publii) if needs be.

All the best und vielen dank,

schlartibardfast

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests