htmly icon indicating copy to clipboard operation
htmly copied to clipboard

Problem with categories

Open LeeUnd opened this issue 2 years ago • 3 comments

I have a category that displays in the sidebar with the other categories (I had originally created it myself). But when I click on the link, it says "This page does not exist". However, in the "Admin" section, under the "Categories" list, it appears also, showing 44 articles under it. But when I click on the "Edit" button for that category, it displays another category that's not even physically near it.

Help?

LeeUnd avatar Sep 12 '22 21:09 LeeUnd

Did you already rebuild HTMLy's cache? Did you clear your browser's cache? What's the exact name of the category? Are you using the latest HTMLy version? Please show us the directory tree of your HTMLy installation.

bttrx avatar Sep 17 '22 09:09 bttrx

Did you already rebuild HTMLy's cache? Yes Did you clear your browser's cache? Yes What's the exact name of the category? Israel Are you using the latest HTMLy version? Yes Please show us the directory tree of your HTMLy installation.

Directory tree attached. dirList.txt

LeeUnd avatar Sep 18 '22 01:09 LeeUnd

Also, in what format (language, etc.) are the templates written (i.e., post.html.php)?

LeeUnd avatar Sep 19 '22 23:09 LeeUnd

in what format (language, etc.) are the templates written (i.e., post.html.php)?

In PHP, each "echo" statement is directly sent to the browser which interprets it as HTML/Javascript

Those templates are included by other functions in HTMLy.php and the final layout is sent to the render() function which is the one which really sent the full layout to the browser.

HTMLy is difficult to understand because mainly most of the logic is in htmly.php which has 3600 lines.

I did a rewrite of HTMLy which breaks htmly.php in multiple functions and folders in a MVC manner and which adds objects programming. Object programming makes it much easier to understand the logic.

I think HTMLy would benefit from such a rewrite, even if my code cannot be shared as it is awful.

There are much better programmers than me ;-)

image

Hjertesvikt avatar Sep 20 '22 08:09 Hjertesvikt

How would you move the archives (or others) to another page? When I create a static page, it's saved as a .mt. However, it doesn't display anything using <?php echo archive_list() ?>. Any suggestions?

Also, there are no "templates" or template engine from which to create new pages?

LeeUnd avatar Sep 20 '22 20:09 LeeUnd

Directory tree attached. dirList.txt

I have no idea, sorry.

How would you move the archives (or others) to another page?

What do you mean by "or others"?

When I create a static page, it's saved as a .mt. However, it doesn't display anything using <?php echo archive_list() ?>. Any suggestions?

An .md file is a file in Markdown syntax. Its content will be parsed by the included Markdown engine, which doesn't understand PHP. It would require a change to the Markdown syntax and its engine to allow interpretation by PHP. That's beyond the scope of HTMLy being a simple blog engine.

Also, there are no "templates" or template engine from which to create new pages?

That's correct. You may wish to (ab)use a draft post as a template to copy from.

bttrx avatar Sep 25 '22 17:09 bttrx

Thanks. I appreciate all your help. Is anybody planning on continuing to develop HTMLy?

LeeUnd avatar Sep 25 '22 21:09 LeeUnd

What's the exact name of the category? Israel

I hit the same bug (or feature?) yesterday in my installation. (I'm using the "logs" theme.) I had created a category "Palmtops - Atari Portfolio" and second category "Palmtops". I added a test posting to category "Palmtops - Atari Portfolio".

Behavior in admin panel is as follows:

  • On the admin/categories page for both categories the "Contents" row shows a figure of 1. -> This is a bug.
  • Clicking on "Palmtops" gives "404 Not Found - This page doesn't exist !". -> This is a bug. Plus: The space before the exclamation mark should be removed to match the visitor's view.
  • Clicking on "Palmtops - Atari Portfolio" correctly shows my test posting.

Behavior in visitor's view is as follows:

  • Both categories are shown! -> This is a bug.
  • Clicking on "Palmtops" gives "404 Not Found - This page doesn't exist!". -> This is a bug.
  • Clicking on "Palmtops - Atari Portfolio" correctly shows my test posting.

Your structure is:

¦   ¦       +-- israel
¦   ¦       +-- israel-and-apartheid
¦   ¦       +-- israel-and-the-land
¦   ¦       +-- israel-self-defense
¦   ¦       +-- israels-security

(edited by me)

So you have several categories starting with the word "israel". I didn't look at HTMLy's source code, but my wild guess is, HTMLy matches the categories name from left to right. Probably an error in a regular expression. I will have a look later.

bttrx avatar Oct 09 '22 09:10 bttrx

Thanks!

LeeUnd avatar Oct 09 '22 18:10 LeeUnd

Sorry, I didn't look into the issue so far, but I think, you can workaround by renaming category "Israel" to "Israel - General".

bttrx avatar Oct 22 '22 22:10 bttrx

Np. I'll give it a try. Thanks!

LeeUnd avatar Oct 23 '22 20:10 LeeUnd

Hello, the newest version should fix this issue

danpros avatar Dec 07 '23 03:12 danpros

Please make new issue if the problems still persist

danpros avatar Dec 14 '23 14:12 danpros