Keyword

Smart Search K2 plugin preventing other plugin loads?

  • Sean Carney
  • Sean Carney's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 8 months ago - 8 years 8 months ago #150645 by Sean Carney
I have a problem where my Smart Search stopped indexing or displaying any EasyBlog5 content. The only reason I am mentioning this here is because the administrators at EasyBlog believe that K2 is somehow doing something to prevent the other plugins from loading. Have you ever heard or seen something like this. Here is the exact message they gave me in response to my ticket to them:

There is really something not right with your smart search as I have tried to turn off k2 smart search as it was throwing errors when smart search is trying to index.

However, after disabling that, the smart search index wouldn't work. I really have no idea what is K2 trying to do and I believe it is preventing from the next plugin to work


I sure would like to get my EasyBlog content indexed. The Smart Search is indexing all of the K2 content.

Any ideas would be appreciated. BTW, these are the versions of the Smart Search plugins I have installed:

Smart Search - EasyBlog Posts Plugin 3.5.0

Smart Search - K2 Plugin 2.6.9

I have been trying to figure out if you have a more recent version of the K2 Plugin but believe I have the most current version.

Sean Carney
Last edit: 8 years 8 months ago by Sean Carney. Reason: To check the box to be notified of replies to this topic

Please Log in or Create an account to join the conversation.

  • Sean Carney
  • Sean Carney's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 8 months ago #150671 by Sean Carney
Is there anything like a log with the Smart Search that you are aware of. Basically I need to try to figure out which K2 items the index is failing on. I am surprised to have nobody respond to my post.

Please Log in or Create an account to join the conversation.

  • Sean Carney
  • Sean Carney's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 8 months ago #150683 by Sean Carney
I found some Joomla.org pages about the Smart Search indexer that got me onto the command line where I ran a command and received the following errors. So, I think I am finding the answer.

I found the following page with instructions on how to run the indexer from the command line: docs.joomla.org/Setting_up_automatic_Smart_Search_indexing

When I followed the instructions and ran the indexer i got the following message ending with an error:
-sh-4.1$ php finder_indexer.php
Smart Search INDEXER
============================
Starting Indexer
Setting up Smart Search plugins
Setup 846 items in 0.194 seconds.
PHP Notice: Use of undefined constant K2_JVERSION - assumed 'K2_JVERSION' in /mnt/data/vhosts/casite-505587.cloudaccess.net/httpdocs/components/com_k2/helpers/route.php on line 191

Notice: Use of undefined constant K2_JVERSION - assumed 'K2_JVERSION' in /mnt/data/vhosts/casite-505587.cloudaccess.net/httpdocs/components/com_k2/helpers/route.php on line 191
PHP Notice: Use of undefined constant K2_JVERSION - assumed 'K2_JVERSION' in /mnt/data/vhosts/casite-505587.cloudaccess.net/httpdocs/components/com_k2/helpers/route.php on line 191

Notice: Use of undefined constant K2_JVERSION - assumed 'K2_JVERSION' in /mnt/data/vhosts/casite-505587.cloudaccess.net/httpdocs/components/com_k2/helpers/route.php on line 191
PHP Notice: Use of undefined constant K2_JVERSION - assumed 'K2_JVERSION' in /mnt/data/vhosts/casite-505587.cloudaccess.net/httpdocs/components/com_k2/helpers/route.php on line 191

Notice: Use of undefined constant K2_JVERSION - assumed 'K2_JVERSION' in /mnt/data/vhosts/casite-505587.cloudaccess.net/httpdocs/components/com_k2/helpers/route.php on line 191
PHP Fatal error: Class 'K2Model' not found in /mnt/data/vhosts/casite-505587.cloudaccess.net/httpdocs/components/com_k2/helpers/route.php on line 318

Fatal error: Class 'K2Model' not found in /mnt/data/vhosts/casite-505587.cloudaccess.net/httpdocs/components/com_k2/helpers/route.php on line 318
-sh-4.1$

I also found this page: docs.joomla.org/Smart_Search_on_large_sites
Sean Carney

Please Log in or Create an account to join the conversation.

  • Sean Carney
  • Sean Carney's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 8 months ago #150687 by Sean Carney
The guys from StackIdeas were able to get their content Indexed on my site by turning OFF the K2 finder plugin. Actually it was a few more steps than that. I am now running another Index to get as much K2 content Indexed as I can before the Indexing crashes. Hopefully somebody at JoomlaWorks will understand this issue and be able to give some support and direction. Here is the part of my message from StackIdeas about how they were at least able to get their content indexed:

<stackideas_support>
Mark replied on Sunday, January 17 2016, 06:59 AM
This is what I did now to re-index everything again:

1. Disabled all content plugins
2. Disabled the System - K2 plugin
3. Disabled the K2 finder plugin
4. Re-ran the "Clear Index"
5. Re-ran the "Index"

After applying the above, everything seems to be indexing everything correctly now. I have just spent the last 8 hours fixing something that is not even an issue with our extensions / plugins.
</stackideas_support>

I did find on the Internet other people receiving this same error message but nobody seemed to have resolved their issue.

The error messages point to two lines:
/components/com_k2/helpers/route.php on line 191
/components/com_k2/helpers/route.php on line 318

I also wonder if this might be happening because the site is too large for the Smart Search index? That doesn't seem likely but I saw some indications that could explain why it started happening all of a sudden.

Thank you anybody that can help with this. Until we fix it my site will have to stay with partially broken search results for K2 items.

Sean

Please Log in or Create an account to join the conversation.

More
8 years 8 months ago #150702 by Lefteris
You are getting those errors regarding the K2 system plugin because you re trying to index using the command line.

K2 requires that it's system plugin is enabled. All classes and variables are defined there. So, when you are running the indexer through the command line, that plugin is not loaded, that's why you get those errors.

We will try to find a way to provide support for the command line auto indexer.

Finally, disabling the K2 Smart Search plugins, should move K2 out of the way. It should not block other Smart Search plugins.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
8 years 8 months ago #150705 by Lefteris
Here it is:

github.com/joomlaworks/k2/commit/fd0464865deb2bb572a56192577876a01265e651

Let me know if that solves the issue.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Sean Carney
  • Sean Carney's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 8 months ago - 8 years 8 months ago #150715 by Sean Carney
Thank you for your response Lefteris,

I was trying to run on the command line only because running the Smart Search Index is failing in the Smart Search Component. Basically it appears to be timing out. It never finishes. Then it also appears to have not indexed all of the K2 content and it also does not index any of the other content, including my EasyBlog content. I had thought this was possibly an EasyBlog problem but Mark from StackIdeas.com checked it out and let me know that the failure was coming from K2.

Because the indexer is failing I started searching for some possible solutions. I read on the Joomla.org site that sometimes the Indexer might fail if there are too many items to index. However, I have no idea how many is too many. I have just over 400 K2 items and just over 400 EasyBlog posts. So, somehow I do not believe I would qualify as having too many. But, I guess that is a possibility. Regardless, that is where I found instructions abour running on the command line might work.

After I ran on the command line I encountered the errors which I submitted. My assumption was that maybe those errors being from K2 might have been what Mark from StackIdeas had run into and why he stated that K2 was causing the Smart Search Index problems. Your reply seems to indicate that those errors will occur any time the indexing is done from the command line without the addition of the code you provider being added into the file at plugins/finder/k2.php

I did not yet add that code because I first want to solve the problem of why the Smart Search Index is not working from the Component. Mark from StackIdeas was able to get my other content indexed by disabling the Smart Search - K2 finder plugin, as well as all the content plugins and then indexing from within the Smart Search Component. After that I ran the index again and it got my K2 items indexed although I am not sure it got them all. In fact I would be surprised if it successfully indexed all my K2 items since it did not complete.

I also found something else that looked interesting to me at github.com/joomlaworks/k2/issues/79

The entry I found below makes me wonder if this is something that I could add in order to fix my problem with the Smart Search Index apparently crashing when launched from the Smart Search Component:

kavadas commented on Nov 29, 2013
I think that you should go with the web interface for this. That's also why the finder plugins are there. They will update the database when a record is updated. In any case try to add the following line in the file components/com_k2/helpers/route.php:

require_once JPATH_ADMINISTRATOR.'/components/com_k2/models/model.php';

Place it at the beginning of the file. Note that this might fix this issue but you may face other issues. K2 uses a system plugin to load it's classes. If the CLI does not invoke the system plugins you will get another Fatal error on some other file/line.


I have been hesitant to edit any K2 files but if you think that the instructions from jkavadas from Nov 29, 2013 are relevant than I can add it to the route.php file to see if it fixed the indexing from the component.

I can also add the five lines of code you provided to plugins/finder/k2.php and test from the command line afterwards.

I hope this makes sense. Have you ever seen K2 causing the Smart Search Index to fail from the Component?

Thank you, Sean Carney
Last edit: 8 years 8 months ago by Sean Carney.

Please Log in or Create an account to join the conversation.

  • Sean Carney
  • Sean Carney's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 8 months ago #150730 by Sean Carney
Since I did not receive a reply I figured I had better try to abandon the idea of getting Smart Search Indexing for K2 to work from the Smart Search Component.


So, I decided to try the code you gave me to add to the file:
plugins/finder/k2.php

I made a copy of my live site and tested on the copy at drc.cloudaccess.host

When I did that ran, so I believe we made progress. If we can figure out the CLI then I can just set up a cronjob and we can leave the Smart Search Component non-functional. (that is not my preference but if it has to be it has to be)

There are now some warning messages related to different files. One is a jw_sigpro.php file and the other is an EasyBlog file. video.php

Here are the paths to the files:
/httpdocs/plugins/content/jw_sigpro/jw_sigpro.php on line 511
httpdocs/administrator/components/com_easyblog/includes/videos/videos.php on line 355

Here is the results of my command line where you will see that there are errors now coming from two more files. I would sure like to know what you think we should do next. I did get a LOT of the files indexed. Probably about 30% of what is indexed on the live site.


-sh-4.1$ php finder_indexer.php
Smart Search INDEXER
============================
Starting Indexer
Setting up Smart Search plugins
Setup 846 items in 0.191 seconds.
* Processed batch 1 in 12.992 seconds.
* Processed batch 2 in 8.915 seconds.
PHP Notice: Undefined index: REQUEST_URI in /mnt/data/vhosts/casite-686358.cloudaccess.net/httpdocs/plugins/content/jw_sigpro/jw_sigpro.php on line 511

Notice: Undefined index: REQUEST_URI in /mnt/data/vhosts/casite-686358.cloudaccess.net/httpdocs/plugins/content/jw_sigpro/jw_sigpro.php on line 511
PHP Notice: Undefined index: REQUEST_URI in /mnt/data/vhosts/casite-686358.cloudaccess.net/httpdocs/plugins/content/jw_sigpro/jw_sigpro.php on line 511

Notice: Undefined index: REQUEST_URI in /mnt/data/vhosts/casite-686358.cloudaccess.net/httpdocs/plugins/content/jw_sigpro/jw_sigpro.php on line 511
* Processed batch 3 in 17.772 seconds.
* Processed batch 4 in 18.32 seconds.
* Processed batch 5 in 24.126 seconds.
* Processed batch 6 in 63.29 seconds.
* Processed batch 7 in 59.795 seconds.
* Processed batch 8 in 32.76 seconds.
PHP Notice: Undefined index: host in /mnt/data/vhosts/casite-686358.cloudaccess.net/httpdocs/administrator/components/com_easyblog/includes/videos/videos.php on line 355

Notice: Undefined index: host in /mnt/data/vhosts/casite-686358.cloudaccess.net/httpdocs/administrator/components/com_easyblog/includes/videos/videos.php on line 355
PHP Notice: Undefined index: host in /mnt/data/vhosts/casite-686358.cloudaccess.net/httpdocs/administrator/components/com_easyblog/includes/videos/videos.php on line 355

Notice: Undefined index: host in /mnt/data/vhosts/casite-686358.cloudaccess.net/httpdocs/administrator/components/com_easyblog/includes/videos/videos.php on line 355
* Processed batch 9 in 24.79 seconds.
* Processed batch 10 in 15.677 seconds.
* Processed batch 11 in 17.502 seconds.
* Processed batch 12 in 25.349 seconds.
* Processed batch 13 in 17.505 seconds.
* Processed batch 14 in 31.164 seconds.
* Processed batch 15 in 44.8 seconds.
* Processed batch 16 in 23.656 seconds.
* Processed batch 17 in 13.8 seconds.
Total Processing Time: 452.407 seconds.

Please Log in or Create an account to join the conversation.

  • Sean Carney
  • Sean Carney's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 8 months ago - 8 years 8 months ago #150751 by Sean Carney
Ah... bummer... no answer yet! :-(
I don't believe I can get my Smart Search Index working properly without your help right now.
Last edit: 8 years 8 months ago by Sean Carney. Reason: make the sad face more prominent. :-)

Please Log in or Create an account to join the conversation.

  • Sean Carney
  • Sean Carney's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 8 months ago - 8 years 8 months ago #150767 by Sean Carney
Oh Wow. Another day without an answer. I will check again tomorrow. Hopefully we can get this problem fixed. My hosting provider is really interested because they have seen this problem with sites apparently getting too big for the Smart Search Indexer to work from the Component before. They also have some of their customers with large sites using K2. So, they have asked me to keep them informed.
Last edit: 8 years 8 months ago by Sean Carney.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum