Skip to content

Conversation

@Hackwar
Copy link
Member

@Hackwar Hackwar commented Jan 21, 2022

Summary of Changes

This is about the "Content Map" filter field in the "Index" view of Smart Search. While changing the taxonomy table to a nested set schema, I forgot to convert this form field. This means that right now it returns more or less garbage. It should display for example the whole category tree properly indented in the dropdown.

Testing Instructions

  1. Install Joomla with some data, for example the testing sampledata.
  2. Go to "Smart Search -> Index"
  3. Open the filter dropdown and the "Content Map" filter. The entries are rather jumbled.
  4. Apply this PR.
  5. Reload the page and check the filter again. Now everything is aligned properly and indented properly.

@Quy Quy added PR-4.2-dev and removed PR-4.1-dev labels Jan 24, 2022
@Fedik
Copy link
Member

Fedik commented Feb 20, 2022

I got on test installation:

Warning: Undefined array key 34 in administrator/components/com_finder/src/Field/ContentmapField.php on line 110

Something went wrong here

@Hackwar
Copy link
Member Author

Hackwar commented Feb 20, 2022

Can you provide me with the database? I don't see how that is possible right now.

@Fedik
Copy link
Member

Fedik commented Feb 20, 2022

Can you provide me with the database? I don't see how that is possible right now.

Nothing fancy. It a default installation, with our testing sample data, since 4.0, updated to 4.1 :)

@Hackwar
Copy link
Member Author

Hackwar commented Feb 20, 2022

ok, I'll try to see what is happening there. Did it stay the same even after clearing index and reindexing?

@Fedik
Copy link
Member

Fedik commented Feb 20, 2022

Yeah, works only when I Clear index and run Index again.
But I not sure that everyone will do it when will see this error.

@Fedik
Copy link
Member

Fedik commented Feb 20, 2022

Maybe just add empty() check somewhere before foreach.

@Hackwar
Copy link
Member Author

Hackwar commented Feb 20, 2022

I guess that this would fix it as well: #36751

@superknutsel
Copy link

I have tested this item 🔴 unsuccessfully on 28c2779

The content of the dropdown already was nice. After applying the patch I see no difference. Maybe this is a good thing ?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36766.

@Hackwar
Copy link
Member Author

Hackwar commented Apr 3, 2022

@superknutsel Can you explain a bit further? How did you test? Did it REALLY have the right indentation for categories for example in that dropdown?

@superknutsel
Copy link

Hi @Hackwar I hope I did it like intended. Just had a look at the "Smart Search > Index > Filter Options > Select Content Map dropdown" and it all looked fine. Even made a screenshot just to make sure before I applied the patch.
What might be a thing is that I used the Joomla Patch Tester in my site that was on 4.2.0 alpha1 dev.
I just used my most up to date test site and did not realise the version.
If it's not the version to test this agains then sorry, I will make a site with a different release for this to test again.

@Hackwar
Copy link
Member Author

Hackwar commented Apr 3, 2022

The main issue is, that the dropdown should contain among other things a list of all categories and they should be correctly indented according to their level. The current code simply does not do that, so I would be really astonished if it worked correctly for you.

@superknutsel
Copy link

I have tested this item ✅ successfully on 28c2779

@Hackwar After retesting with more categories added at different levels I see what you mean. I was mistakenly thinking the demo data would be enough for this test. And after doing this I can see what the issue is and that the patch is fixing it.
Thanks for your reply and explanation.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36766.

@RickR2H
Copy link
Member

RickR2H commented May 17, 2022

Restore test result


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36766.

@RickR2H
Copy link
Member

RickR2H commented May 17, 2022

I have tested this item ✅ successfully on 1104b4e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36766.

@RickR2H
Copy link
Member

RickR2H commented May 17, 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36766.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label May 17, 2022
@wilsonge
Copy link
Contributor

@bembelimen you might wanna consider merging this for 4.14 as it's directly fixing a regression

@bembelimen bembelimen merged commit a37186d into joomla:4.1-dev Jun 5, 2022
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jun 5, 2022
@bembelimen
Copy link
Contributor

Thx

@bembelimen bembelimen added this to the Joomla 4.1.5 milestone Jun 5, 2022
@Hackwar Hackwar deleted the 4.1-finder-mapfield branch September 7, 2022 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants