PDF files added via Phoca Download are not picked up in Smart Search without manual re-indexing

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
Fred12894
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 02 Nov 2023, 12:07

PDF files added via Phoca Download are not picked up in Smart Search without manual re-indexing

Post by Fred12894 »

Hi,

I am using Phoca Downlad and the Phoca Finder plugins. All great extensions. Articles that are added are automatically picked up in Smart Search without re-indexing. Files (PDFs) added via Phoca Download are not picked up unless a manual index is performed in Smart Search. Is this correct? Is there anyway of automating this so that added PDF files are automatically picked up in smart search without a manual re-index?

Many thanks
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48676
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PDF files added via Phoca Download are not picked up in Smart Search without manual re-indexing

Post by Jan »

Hi, which version of Phoca Download do you use? In latest version there are events for accepting and running search index, when saving the items in Phoca Download.

Jan
If you find Phoca extensions useful, please support the project
Fred12894
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 02 Nov 2023, 12:07

Re: PDF files added via Phoca Download are not picked up in Smart Search without manual re-indexing

Post by Fred12894 »

Thanks for your response Jan. Using version 4.0.9.
I now see that it works and automatically indexes a PDF when i add it via the backend but not when i add a PDF via the front end?

Cheers
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48676
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PDF files added via Phoca Download are not picked up in Smart Search without manual re-indexing

Post by Jan »

Hi, in frontend, there are for now no such events. I will take a look at it, if there will be possible way to implement them :idea:

Jan
If you find Phoca extensions useful, please support the project
Fred12894
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 02 Nov 2023, 12:07

Re: PDF files added via Phoca Download are not picked up in Smart Search without manual re-indexing

Post by Fred12894 »

Hi Jan,

Thanks again for your response.

That would be very useful i think, if the events could be implemented for the frontend upload.

Cheers
f16jack
Phoca Member
Phoca Member
Posts: 18
Joined: 28 Mar 2014, 20:00

Re: PDF files added via Phoca Download are not picked up in Smart Search without manual re-indexing

Post by f16jack »

Hi

I have the same issue. It works great if i go into the backend and manually index, but the index does not occur automatically when I upload in the front end.

In addition, if I run a cron job to automatically index it locks the search results. They appear, but when selected I receive (even as an administrator): “You don't have permission to access this. Please contact a website administrator if this is incorrect.”

But If I manually index in the back end it works great. I'd prefer not to have to manually index each time I upload a PDF on the front end.
Jack
f16jack
Phoca Member
Phoca Member
Posts: 18
Joined: 28 Mar 2014, 20:00

Re: PDF files added via Phoca Download are not picked up in Smart Search without manual re-indexing

Post by f16jack »

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 (running the CLI).

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.

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.

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.

Any suggestions? Thanks
f16jack
Phoca Member
Phoca Member
Posts: 18
Joined: 28 Mar 2014, 20:00

Re: PDF files added via Phoca Download are not picked up in Smart Search without manual re-indexing

Post by f16jack »

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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48676
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PDF files added via Phoca Download are not picked up in Smart Search without manual re-indexing

Post by Jan »

Hi, great to hear it.
If you find Phoca extensions useful, please support the project
Post Reply