Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Slow adding New Categories
Altering categories should be much faster in 4.8.8 now, especially when you have thousands of them. This has required much code rewriting, so please test if everything works as expected. We are waiting for Phil’s opinion to eventually change the HTML markup on the admin side.
As a by-product, <txp:category_list />
has got some enhancements to easily output category trees/branches:
<!-- output a nested tree of 'somecat' children -->
<txp:category_list parent="somecat" children wraptag="ul" break>
<txp:category />
</txp:category_list>
<!-- output the path from parent to child category -->
<txp:category_list parent="somecat" categories="childcat" wraptag="ul" break />
Offline
Re: Slow adding New Categories
Thanks Oleg,
I will make some testings next week.
Offline
Re: Slow adding New Categories
etc wrote #331499:
Altering categories should be much faster in 4.8.8 now, especially when you have thousands of them.
a first quick test, with about 50 categories: category lists and category based pages feel faster. And all still display as expected so far :-) Will see if/how I can test with more categories (thousands probably not, though, wouldn’t know how to handle those…)
BTW, I had a play at building the category panel as a list (mockup, articles only) – here.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Slow adding New Categories
phiw13 wrote #331502:
a first quick test, with about 50 categories: category lists and category based pages feel faster. And all still display as expected so far :-) Will see if/how I can test with more categories (thousands probably not, though, wouldn’t know how to handle those…)
I have tested with ~1000 categories, and, say, deleting few categories switches from ~1000 queries and 1.7s to almost immediately. You can call
<txp:php>rebuild_tree_full('article');</txp:php>
to emulate the previous behaviour (and also restore the tree if anything goes west).
BTW, I had a play at building the category panel as a list (mockup, articles only) – here.
Looks fine, thank you. I leave the decision with you UX gurus.
Offline
Re: Slow adding New Categories
Hi
I downloaded today the 4.8.8 branch to test the category change but got an error message when going to admin :
( ! ) Fatal error: Uncaught TypeError: Return value of Textpattern\Textfilter\Registry::offsetSet() must be an instance of Textpattern\Textfilter\void, none returned in C:\wamp64\www\textpattern-4.8.7\textpattern\vendors\Textpattern\Textfilter\Registry.php on line 160
( ! ) TypeError: Return value of Textpattern\Textfilter\Registry::offsetSet() must be an instance of Textpattern\Textfilter\void, none returned in C:\wamp64\www\textpattern-4.8.7\textpattern\vendors\Textpattern\Textfilter\Registry.php on line 160
It s a dev branch after all.
Cheers.
Offline
Re: Slow adding New Categories
phiw13 wrote #331502:
BTW, I had a play at building the category panel as a list (mockup, articles only) – here.
I Phil, it s really nice, it s good to see the ul/li construction after all, i can then publish some little plugins to add some functions like: Show/Hide children / Slide to a desired category / View name category or title category, …
Cheers.
Offline
Re: Slow adding New Categories
Dragondz wrote #331557:
I downloaded today the 4.8.8 branch to test the category change but got an error message when going to admin :
Hi,
misery, void
return type was added in php 7.1. Try removing these declarations in textpattern\vendors\Textpattern\Textfilter\Registry.php
(then php 8.1 will complain).
Offline
Re: Slow adding New Categories
Uhhh rock and a hard place. That’s annoying. Almost forces us to adopt 7.1 minimum. Drat.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Slow adding New Categories
Bloke wrote #331560:
Uhhh rock and a hard place. That’s annoying. Almost forces us to adopt 7.1 minimum. Drat.
Yep. Or release two versions, but seemingly webhosts sometimes upgrade php without warning the users.
Actually, we don’t seem to use the conflicting code anywhere in core. I also doubt any plugin needs it. So we could probably just comment it out?
Offline
Re: Slow adding New Categories
etc wrote #331563:
we don’t seem to use the conflicting code anywhere… So we could probably just comment it out?
Worth a try.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Offline
Re: Slow adding New Categories
Hi
Yes error gone (php 7.0.32).
I tested the category tab (Adding categories, modifying, change parent, deleteing) have got no problem. (I have 2000 cat in the tab).
Cheers.
Offline