[Locked] Smart Search Indexes trashed and unpublished pages - Forum | JoomShaper
Solved SP Page Builder Locked

Smart Search Indexes trashed and unpublished pages

Asked by Martin 1 year ago Last activity 1 year ago

Like the title says, at least with Joomla 5.2 and SP Page Builder 5.4.4, unpublished and even trashed pages are being indexed.

Thanks!

Accepted answer

Marked as the solution
Ofi Khan Staff

It seems to be working. Thanks for sharing the solution. I have asked the developer team to check it. If they found it necessary, then the plugin file will be fixed.

7 more replies

Ofi Khan Staff

Hello Martin

I have checked the issue. It seems that Smart Search plugin indexes unpublished and trashed articles too. This is an issue or feature (might be) for Smart Search plugin. We do not have anything to do here. May be you can engage in Joomla Forum about the issue since it is a Joomla issue.

Best regards

Martin Asked this

Thank you for a quick answer!

Just wondering, wouldn't it be possible to exclude inactive and trashed items in:
/plugins/finder/sppagebuilder/sppagebuilder.php

on line 246 in the querie's WHERE statement?

I couldn't imagine this being a feature that disabled and trahsed items come up in the search results :)

And I will see if I can find some more info regading Joomla Smart Search in general.

Thanks!

Paul Frankowski Senior Staff
1 year ago · edited

Martin, If I may...

About delated pages, indeed by default, deleted by user pages are not physically deleted from the database. So I suggest to use PHPMyAdmin and browse prefix_sppagebuilder table and remove those which you don't need anymore. Later reindex Search again.

About unpublished I don't have any tip yet.

Martin Asked this

Thanks, it is one way to do it, but it's not a viable option explaining this to the end-users (who often have limited knowledge on the matter) that you have to go to the database and mess with some records.

It seems that adding this to the line 261 in:
/plugins/finder/sppagebuilder/sppagebuilder.php
does the trick:
...
->where($db->quoteName('a.published') . ' = ' . $db->quote('1'));

Just tested and unpublised pages are not indexed anymore.

Ralf Besl

I just had that problem myself that an unpublished Page Builder page is still being shown as a result via Smart Search in the frontend. This can't be intended behaviour, can it?

Paul Frankowski Senior Staff

have you used above code? try

Ralf Besl

No, but shouldn't that be part of the Page Builder Search plugin by default?

Paul Frankowski Senior Staff

I checked and we have that line in plugin already in SPPB 5.7

You have to reindex pages in Smart Search otherwise Joomla still remember that page as published.

Ralf Besl

I updated Page Builder to the newest version 5.7.0 and reindexed the Smart Search. But it's still showing the unpublished results. I put two screenshot links in the hidden content section.

Paul Frankowski Senior Staff

Please clear Joomla cache, and reindex again.

If those steps will not help, we need access to admin area to make deeper investigation. But it's OK on our side.

Ralf Besl

Clearing Cache also did not work. I could however manually remove both pages from the Index and now after a reindex they don't appear again.

So the issue I guess is with them not being removed automatically by a reindex?

This question is locked, so it takes no new replies. Have a similar problem? Ask a new question.