[RESOLVED] Bug? clicking on a keyword then sorting the search results by date -> lose the keyword search criterion

I'm seeing the following happen:

  • Plone 6.1.4 classic

  • I imported ~28,000 content items that are essentially Documents, many of which have a keyword (tags... geez, could we stick to the same terminology? :joy:) assigned via the Categorization fieldset

  • I've rebuilt the catalog

Here's the sequence of steps:

  1. I view one of the content items that has a keyword assigned
  2. I click on its keyword
  3. I'm shown the list of the 167 matching items that have the same keyword
    (the URL is http://localhost:8080/Plone/@@search?Subject%3Alist=TL0288)
  4. I click on "Sort by" and choose "date (newest first)"
  5. Instead of seeing the 167 items having the keyword, sorted by date, I see a list of 28,342 items sorted by date. The URL is http://localhost:8080/Plone/@@search?sort_on=Date&sort_order=reverse&b_start%3Aint=0&advanced_search=False&SearchableText=&created.range%3Arecord=min&pt_toggle=%23&portal_type%3Alist=Folder&portal_type%3Alist=Image&portal_type%3Alist=note&created.query%3Arecord%3Adate=1970-01-02T00%3A00%3A00

What could be causing this?

It seems like your search just returns all the items in the catalog.

Maybe rebuild your catalog?

Thanks Mathias. Yes, tried that a few times already.

What I don't understand is why adding a sort criterion would also change the type criterion

Definitively a bug. Just tried that on classic.demo.plone.org and if you go to the search page with ?Subject:list=mysubject and you chose a specific type filter or want to re-sort, it looses the Subject query parameter. Would be great if you file a bug in CMFPlone repository.

1 Like

There already is a ticket: Search page results by Keyword/Subjects don't batch correctly · Issue #3730 · plone/Products.CMFPlone · GitHub

1 Like

The fix is merged. Release is underway :face_with_peeking_eye: Fix `pat-search` when providing URL parameters by petschki · Pull Request #1539 · plone/mockup · GitHub

3 Likes

We need to make a service called gobeerme.com :slight_smile: :clinking_beer_mugs:

In my Plone 6.1.4 installation I added this to mx.ini:

[plone.mockup]
url = https://github.com/plone/plone.mockup
branch = master

and reran make install. I can see the new ./sources/plone.mockup directory, but when I restart Plone I continue to see the same behaviour as before. What else do I need to do to get the corrected behaviour?

plone.mockup is abandoned long time ago and has nothing to do with the Plone 6 mockup stack.

The mockup fixes will be released in plone.staticresources. But first we need a backport to 5.4.x for Plone 6.1.x ... current mockup master is for Plone 6.2 only... stay tuned :beer_mug:

I've just released staticresources 2.3.6 with this fix.

2 Likes

It works beautifully! Thank you @petschki :heart_eyes: