Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
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
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
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
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
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
Offline