Our Joomla! extensions are all OpenSource and free of charge. Support is also free of charge. Nevertheless, we do have costs that need to be paid. This is done out of our own pocket. We have had a donation button on our website for some time now, which is actually used to make donations from time to time. The donation progress bar is intended to show how much support we have received and how much is still missing to cover the basic costs, such as hosting and services. The annual costs currently amount to 356€.

Thank you for your support!

Donate PayPal GitHub Sponsors You want to support and there is no suitable platform? Write to us in the forum.


Duplicate entries for categories with parent categories in Joomla 4

10 months 1 week ago - 7 months 2 weeks ago #446 by LUCiD
Hello Sven. Hello community.
Thanks a lot Sven, for this great advancement of the xmap component - I use it on my Joomla 3 website.

I also want to use it on Joomla 4 and while migrating I was pleased to see the new version for J4, but I get duplicate category entries (with all articles in them) in the HTML sitemap when a category has a parent main category. If that is the case and there is a parent category, the subcategories of it are shown twice in the HTML sitemap.
I tested it and created a new menu where I linked only the subcategories and there it was as it should be, without duplicates.

This happens on Joomla 4.3.4 (not on Joomla 3) on a local XAMPP for migration from J3 to J4 with PHP 8.2.4 and current sitemap extension V4.0.0, only the content plugin enabled.
I don't know why or where this is happening (in the source code) and some guidance and help to solve the problem would be very appreciated.
I saw in the function 'printNode' in the default_class.php file a treatment with 'if' and 'empty', but don't quite understand the logic to it. With Joomla 3 it works, only with Joomla 4 I get the duplicates.
// To avoid duplicate children in the same parent
if ( !empty($this->_parent_children[$this->level][$node->uid]) ) {
return FALSE;

Best regards.

Please Log in or Create an account to join the conversation.

10 months 4 days ago - 10 months 4 days ago #448 by LUCiD
Doesn't seem to be anything else going on here, or is everyone on vacation?!

However. If nothing more happens here, then this sitemap (for me) is no longer usable as it should be. Then I will probably use the OSMap from Joomlashack. Although the OSMap supports e.g. only one column in the HTML sitemap, it also has an option in the backend to automatically suppress duplicate entries and so the duplicate categories with the parent categories are also gone. Unfortunately, direct links in other menus to already existing blog entries are not displayed then, but this seems to me an acceptable limitation for a sitemap, since the entries are included in the respective category anyway.

So. Thanks again for this extension, which served me well in the past! Unfortunately it is hardly usable anymore like this, with the duplicate entries. I have spent a lot of hours trying to fix the duplicate entries myself, but have had no success and am now giving up.


Please Log in or Create an account to join the conversation.

10 months 4 days ago #449 by Sven Schultschik
you're on the right track. Vacations kept me busy not able to work through all things.

The development is ongoing and I currently working on a bigger update. So if you have any feature requests, you're welcome.

I will look into that duplicate issue, didn't notice it on my sites.

How is your timeline for your J4 update?
The following user(s) said Thank You: LUCiD

Please Log in or Create an account to join the conversation.

10 months 4 days ago - 10 months 4 days ago #451 by LUCiD
Hello Sven,
I was well correct, with the vacation, but thank you for your answer!

I am actually done with the migration of my Joomla 3 site to Joomla 4, until just that with the sitemap and a few other things, such as redirects via the .htaccess file and the like, e.g. cron jobs, which I will do only when the new site is also online.
That means I could wait a bit, or just import your sitemap later. That would barely be a problem, since this changes nothing in the URL structure. I just wanted to continue quickly, because otherwise I always have to enter new posts also 2 times, that means also in the local new instance (with C&P), and possibly any changes to existing and new posts as well and maybe new tags.

I don't wanted, nor want to put you under any time pressure, I just wanted to hear if it is still going on or not. If you develop your sitemap further and fix such errors, I will certainly bring it in again and would like to test it for you locally first. Unfortunately, as already mentioned, I have not managed to prevent the duplicate entries myself, otherwise I could have contributed some code.

As a small hint. The OSMap also behaves like your sitemap, if I turn off "Ignore Duplicated Items" in the options of the OSMap. Then it also shows the duplicate categories that have parent categories, but then it also shows the direct links to items in another menu.
It would be nice if your sitemap would work like it did so far with Joomla 3. Show all categories with parent categories only once, but also the other direct links in other menus, such as e.g. "selected posts" should appear separately linked.

Best regards and have a nice remaining vacation!

Please Log in or Create an account to join the conversation.

10 months 1 day ago #452 by Sven Schultschik
Hi, I agree.
It will be developed and I will test your finding and agree that it should behave like with J3.

Thank you
The following user(s) said Thank You: LUCiD

Please Log in or Create an account to join the conversation.

9 months 3 weeks ago #454 by LUCiD
Hi Sven.

I'm looking forward to it.
Please leave me a little message here when you are ready, or even if I should test it first, because then I get an email from the board.

Thanks in advance and best regards!

Please Log in or Create an account to join the conversation.

Time to create page: 0.145 seconds
Powered by Kunena Forum