With the newest versions of Search by Page (6.x-1.9 and 7.x-dev), SBP is setting up some dummy blocked user accounts to use for search indexing. In some cases, it may run into problems of not being able to load the user accounts it created, create new ones, or find the ones it created. See http://drupal.org/node/605458#comment-2605970 (and following comments) for one report of this.

The quick fix for this is to go to your User management page and delete the 'sbp indexing xxxx' users.

But the module needs to handle this better.

Comments

jhodgdon’s picture

Version: 6.x-1.9 » 6.x-1.x-dev
Status: Active » Fixed

I just committed a fix to this and released as Version 6.x-1.10, along with another bug fix.
Drupal 7 fix will be committed shortly.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jpcwebb’s picture

Hi, I'm getting a problem where the users created by sbp are left intact, and as a result they get replicated in my gallery and SMF forum integration modules. It seems that sbp does not clean up after itself very well. Am using 6.x-1.10 BTW.

jpcwebb’s picture

Status: Closed (fixed) » Active
jhodgdon’s picture

The users should be left intact, but they should have status "blocked". Hopefully you can disable showing blocked users in those other modules?

jpcwebb’s picture

Not really, because the synchronising happens automatically, and the gallery and forum don't recognise Drupal blocked status (as they are separate software) so unless I manually go into the gallery and forum and remove the users, they will show up. In the gallery, a dedicated album is created for each new user, so you end up with a redundant album visible to all users. The other problem is that the dummy user is appearing in the 'who's online' block, partularly when the 'Remember me' module is installed. Why can't the dummy user be deleted after indexing?

jhodgdon’s picture

Status: Active » Fixed

The users could be deleted after indexing, but it sounds like the contributed modules you are using have some bugs around not recognizing Drupal's core blocked status for users.

Anyway, these indexing users will definitely need be present during each cron run, while the indexing is happening, so I guess the problem with the galleries and remember me will at least be intermittent for you. I think your best bet is to fix those other modules (or file issues so their maintainers can fix them), because changing Search by Page in this way won't completely fix your problem.

The other thing you can do is to set up Search by Page so that it always uses Anonymous as the user for indexing. In that case, it won't have to create any blocked users.

jpcwebb’s picture

Hmm, but it seems that there are quite a few modules that could be affected by this, so it seems backwards to go changing them because of the function of this one module. For example, the 'who's online' block is core code, so if it doesn't respect blocked status, I think there is more of a fundamental problem (in theory, a blocked user can't log in so wouldn't show up in the block normally, but spb is circumventing the login system to do its thing, which is why the erroneous message is displayed - I don't regard that as a bug because sbp is not behaving in the way the login system was designed to be used).
Instead, how about hooking into the trigger core module so that after a search index has been performed, an action can be fired to delete the sbp user - that way it's not interfering with the way the module works, and it makes use of existing core functionality?
Presumably using Anonymous user will prevent the module from indexing pages that anonymous has no permission to see, which would defeat the purpose for me as search is only provided for registered users.

jhodgdon’s picture

Status: Fixed » Closed (fixed)

I'll look into the core Who's Online block -- I am not sure why that would be grabbing the indexing users, and maybe I can figure out a way to get around that.

The SBP module wouldn't need to use actions/triggers to delete the users - it could just do it at the end of the cron run. But still, if someone happens to be looking at the galleries or who's online *during* a cron run, they will see the SBP indexing users. So, as I said above, I don't think deleting them afterwards will fully solve your problem, will it?

Agreed, using anonymous is not going to help you on your site if only registered users can see the content.

Anyway, I'll look into the Who's Online block. Maybe there is something the module can do that will help your situation. But I'm going to file it as a separate issue, since it isn't about the duplication problems.
Please continue discussion on #828006: SBP indexing users - delete after indexing or allow name change

I'm closing this issue back up...