Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2025-06-07 19:18:55

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,424
Website GitHub

Re: On creation a category is not listed

I’ve reverted the above unworking patch.

At least, for now, the bleeding edge adi_matrix doesn’t trigger this behaviour so we have some breathing room. Maybe core doesn’t need “fixing” and plugin authors just need to make sure they never call getTree() on the Content > Categories panel, or it will break core behaviour?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#17 2025-06-07 19:39:51

etc
Developer
Registered: 2010-11-11
Posts: 5,661
Website GitHub

Re: On creation a category is not listed

Bloke wrote #339834:

Maybe core doesn’t need “fixing” and plugin authors just need to make sure they never call getTree() on the Content > Categories panel, or it will break core behaviour?

I think we should fix/enhance it somehow, but am unsure on the way. Maybe, refresh if lastmod has changed between two calls? Dunno

Offline

#18 2025-06-07 19:47:24

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,424
Website GitHub

Re: On creation a category is not listed

etc wrote #339835:

Maybe, refresh if lastmod has changed between two calls?

That sounds like a reasonable assumption. Will that work for all content types?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#19 2025-06-07 20:02:28

etc
Developer
Registered: 2010-11-11
Posts: 5,661
Website GitHub

Re: On creation a category is not listed

Bloke wrote #339836:

That sounds like a reasonable assumption. Will that work for all content types?

I hope so, the site lastmod seems to be updated (by core at least) on any category change. So, if a plugin calls getTree() and then a category is altered, the list should be refreshed on successive calls.

This, unfortunately, includes other content (articles etc) updates, but well..

Offline

#20 2025-06-07 21:21:30

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,424
Website GitHub

Re: On creation a category is not listed

etc wrote #339837:

This, unfortunately, includes other content (articles etc) updates, but well..

That’s okay. I think I’d rather have fresh content delivered and less head scratching than a few milliseconds shaved off the response. The cache works most of the time to keep speed up.

Unless you’re operating Textpattern in a heavy multi-user environment, or using many category-based plugins, I doubt it will make much difference in day-to-day admin.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#21 2025-06-08 02:08:48

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,631
Website

Re: On creation a category is not listed

Bloke wrote #339830:

In the meantime, I’ll probably hack the adi_matrix plugin so it only loads the category tree if it’s on an admin page where it needs it. Edit: Patched;

With that patched adi_matrix plugin, category creation or deletion functionality is restored and so far I don’t see any downsides in the plugin’s working. TY.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#22 2025-06-08 09:51:48

etc
Developer
Registered: 2010-11-11
Posts: 5,661
Website GitHub

Re: On creation a category is not listed

Oddly, the site lastmod is not updated on category manipulations (create/edit/delete/etc). Is it a bug? Once patched, the cache refresh based on lastmod seems to work.

Offline

#23 2025-06-08 10:00:07

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,424
Website GitHub

Re: On creation a category is not listed

etc wrote #339840:

Oddly, the site lastmod is not updated on category manipulations (create/edit/delete/etc). Is it a bug?

Maybe. Not sure if we just considered publishable content as “modified”. But it does arguably change the site URL structure, so should probably contribute to lastmod.

Once patched, the cache refresh based on lastmod seems to work.

Excellent. That’s a clever approach.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#24 2025-08-05 10:08:23

etc
Developer
Registered: 2010-11-11
Posts: 5,661
Website GitHub

Re: On creation a category is not listed

Please test if/how it works.

Offline

Board footer

Powered by FluxBB