Advertisement

Smart Search Index - Search results not selectable if Search is run from CLI or Cron Topic is solved

For Joomla! 4.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
f16jack
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Mar 05, 2014 5:28 pm

Smart Search Index - Search results not selectable if Search is run from CLI or Cron

Post by f16jack » Wed Mar 19, 2025 6:15 pm

Hello,
Joomla 4.4.12; mysql 8.0.41-32; php 8.2.27

I have about 800 .pdf files that I have stored under PhocaDownload. These do not automatically index when a new file is uploaded, but that is ok.

"PhocaDownload Finder Plugin (Files)" is loaded and enabled.
"Content - Smart Search" Plugin is loaded and enabled.
Access is Public on each of them.

I have 3 methods of updating the Smart Search Index. All of them update the index properly and give the same results. The 3 methods:
#1. Select the Index button in Components, Smart Search, Index in the backend.
#2. CLI from cPanel at my server.
#3. Cron Job at my server.

The last half of the code (used for #2 and #3 above) is: public_html/cli/joomla.php finder:index

The issue occurs when I use the Smart Search box to search for files after I index.
If indexed with #1, all the Smart Search results are clickable and able to be downloaded. Success!
If indexed with #2 or #3, all the Smart Search results are not able to be selected. Failure!
When the search results are clicked they return an error message of:
"You don't have permission to access this. Please contact a website administrator if this is incorrect."

I am the administrator. It seems that a table or the index is getting locked somehow.

Any suggestions? Thanks

Advertisement
f16jack
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Mar 05, 2014 5:28 pm

Re: Smart Search Index - Search results not selectable if Search is run from CLI or Cron

Post by f16jack » Wed Mar 19, 2025 10:05 pm

Quick update.
If I hover over the unworkable link prior to clicking I can see the url at the bottom of the page.
I took a picture of the link url and then typed it in another browser window. It worked just fine.
The link simply fails if I click on the hyperlink in the search result.
I also logged out and tried the link url and it did not work. Which is good. The link should only work when I am logged in.

f16jack
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Mar 05, 2014 5:28 pm

Re: Smart Search Index - Search results not selectable if Search is run from CLI or Cron

Post by f16jack » Wed Mar 19, 2025 10:22 pm

2nd update. If I right click on the search results it gives me the options of opening the link in a new tab or a new window. If I try this it fails. If I copy the link and paste it in another tab it works.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31733
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Smart Search Index - Search results not selectable if Search is run from CLI or Cron

Post by Per Yngve Berg » Thu Mar 20, 2025 6:38 am

Do you copy the text on the screen or do you use Copy Link Address?

f16jack
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Mar 05, 2014 5:28 pm

Re: Smart Search Index - Search results not selectable if Search is run from CLI or Cron

Post by f16jack » Thu Mar 20, 2025 2:46 pm

Quick answer - I was manually typing the link in the browser.

Today's behavior after running CLI from my cPanel browser Terminal or in a cPanel cron job:

The link fails in after a Smart Search after CLI indexing no matter how I try to open it.
1. click on the returned records, or
2. right click on a returned record, open link in a new tab, new window, or in incognito, or
3. right click, copy link address, paste in browser, or
4. look at the address when I hover over a link, then photo it and manually type it in a browser.

All of these methods work with the returned CLI index prior to a Smart Search. They fail once Smart Search is used.
Mange takk

f16jack
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Mar 05, 2014 5:28 pm

Re: Smart Search Index - Search results not selectable if Search is run from CLI or Cron

Post by f16jack » Thu Mar 20, 2025 3:58 pm

A little more info.
The link prior to SmartSearch ends with: Itemid=207&start=80
The link after SmartSearch ends with: Itemid=334&highlight=WyJqb2huc29uIl0=

All else in the links is the same. Even after the SmartSearch I can past the pre-search link in the browser and it will work. The post-search link never works.

f16jack
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Mar 05, 2014 5:28 pm

Re: Smart Search Index - Search results not selectable if Search is run from CLI or Cron

Post by f16jack » Thu Mar 20, 2025 5:05 pm

I've found the issue and solved my problem.
I had two menu items that were PhocaDownload item. The menus had itemid's of 207 and 334. The SmartSearch was pointing at a bad menu item.
I deleted the bad menu (334) and cleared the cache and deleted trash.
I then recreated the other menu item as an article menu, not a PhocaDownload menu. Now the SmartSearch has only one PhocaDownload menu to point to.

Advertisement

Post Reply

Return to “Joomla! 4.x Coding”