Pagination affects output of search module

Gerben Zaagsma - May 24, 2009 - 17:18
Project:Pagination (Node)
Version:6.x-1.x-dev
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

When Pagination is enabled and I perform a keyword search the list of found nodes all display the same teaser text. Also, there is a list of pages displayed beneath the hits (the number equalling the number of found nodes). See the attached picture.

Any idea what is going on?

Best
Gerben

AttachmentSize
Afbeelding 1.jpg103.15 KB

#1

mundanity - May 24, 2009 - 18:37
Version:6.x-1.5» 6.x-1.x-dev
Status:active» fixed

Hi Gerben,

I've pushed a fix to dev for this. However, previous affected nodes (ie, already indexed) will have to be rebuilt. This can be done by updating the affected nodes with a trivial edit, or changing the reindex field in the search_dataset table for affected nodes to 1 (if you feel comfortable working at the DB level).

#2

Gerben Zaagsma - May 24, 2009 - 19:52

Hi mundanity,

Thanks for the quick reply! I think this simply affected all nodes, it happened with all searches so that would mean rebuilding all nodes. Is rebuilding the search index also an option? Otherwise if you can guide me a bit through your 2nd option (changing reindex field) I could do it in phpmyadmin. I suppose you mean changing the "predefined" value from 0 to 1? (I have an Italian interface that says "predefinito=1")

Can you let me know when new dev version becomes available?

Again many thanks,
Gerben

#3

mundanity - May 24, 2009 - 21:18

Hi Gerben,

The dev version is packaged every 12 hours, I'm not quite sure when exactly, but basically when the date on it changes from the last build (May 10th) then it should be fine to download.

In the search_dataset table, there's 4 fields (sid, type, data, reindex). You'll see for type "node", the reindex field is 0 (basically saying, that the node has been indexed). If you change that to 1, it'll re-index everything on the next cron run.

If you have many many many nodes (ie, hundreds of thousands) I'd suggest you may want to just reindex a few at a time. If it's only a few hundred nodes tops though, it should be fine to switch them all.

Hope that helps!

#4

Gerben Zaagsma - May 25, 2009 - 12:29

Hi mundanity,

Thanks again, this is very helpful! In fact after updating to the latest dev version all is ok already (I reindexed yesterday before updating). Anyway, I still changed the reindex field to 1. Just one final thing: should I change that back to 0 at one point?

Best,
Gerben

#5

mundanity - May 25, 2009 - 15:01

Hi Gerben,

Nope, the cron will reindex on the next pass and switch that value to 0. As a side note, I failed to realize that you can also re-index through the search settings interface in the admin panel, which may have been easier in the first place... :)

#6

Gerben Zaagsma - May 25, 2009 - 17:24

Hi mundanity,

Yes, that's what I did yesterday ;). Anyway, thanks for solving this so fast..!

#7

System Message - June 8, 2009 - 17:30
Status:fixed» closed

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

#8

Gerben Zaagsma - June 9, 2009 - 15:16
Status:closed» active

Hi mundanity,

sorry for opening this again but the proble has resurfaced in the past days. To be honest, I have no clue why and what I could do to fix it? I'm reindexing but it doesn't seem to have an effect.

Gerben

#9

mundanity - June 10, 2009 - 04:26

Hi Gerben,

Hmm, that is odd, can you think of any related things that occurred on your site? (new node type, new modules installed, etc...?). Would it be possible to get me a list of modules that you have installed as well so I can rule out anything like that? Finally, could you attach a new screenshot, perhaps that can give me a few clues into this.

#10

Gerben Zaagsma - June 10, 2009 - 12:46

Hi mundanity,

I've tried to think of changes I made but the only thing I changed was add the Cache Browser module. Can I send the attachments to your email address?

#11

Gerben Zaagsma - June 11, 2009 - 15:27

Here are two attachments:
- what happens when pagination is active and I perform a search
- the installed modules

Hope this helps,
Gerben

AttachmentSize
modules.jpg 354.05 KB
with pagination.jpg 260.53 KB

#12

mundanity - June 12, 2009 - 02:16

Hi Gerben,

Thanks for the additional information, I'm a bit busy at the moment but I'll look into this as soon as I can. Hopefully sometime this weekend.

#13

mundanity - June 18, 2009 - 04:56

Hi Gerben,

I took a bit of a look at this but wasn't able to come up with anything unfortunately. My best guess is that this is a continuation of the previous issue, that being, pagination was being applied while the search index was being rebuilt. The fix that was working basically was to disable pagination if the node build type was anything but NODE_BUILD_NORMAL. This theoretically should ensure that pagination is not applied under any search circumstance.

From your screenshot it looks like for whatever reason that is not the case. I'm thinking it's possible there's some sort of overriding happening due to some module's hook_update_index() call during the search index rebuilding. No modules in the list you have jump out at me as being possibly problematic, however I'd like to rule them all out anyhow.

Can you run this file from your Drupal install for me and post the results? All it does is load Drupal, then checks each installed module to see if it implements hook_update_index().

You can throw the file in your Drupal install wherever (call it test.php if you want), call it, then feel free to delete it (after you paste the results back here! :) )

Thanks for your help.

AttachmentSize
test.php.txt 236 bytes

#14

Gerben Zaagsma - June 18, 2009 - 09:11

Hi mundanity,

thanks for taking a look. these are the results:

node implements update_index
advanced_help implements update_index

Hope this helps,
best,
Gerben

#15

Gerben Zaagsma - June 24, 2009 - 18:11

Hi mundanity,

No clue what changed but I just downloaded and installed the latest development version (I had 1.5 before) and the problem is gone..

Best,
Gerben

#16

mundanity - June 25, 2009 - 04:28
Status:active» fixed

Hi Gerben,

Strange, weren't you using the dev version before (after the first fix?). Unless you reverted back to 1.5 by accident somehow? Anyhow I should probably throw out a 1.6 release to avoid confusion on this issue. I'm glad it's all working for you now!

#17

Gerben Zaagsma - June 25, 2009 - 09:37

Hi mundanity,

I noticed yesterday I was using 1.5, maybe the problem was actually that I accidentally reverted (in which case sorry). Anyway, it works again!

Gerben

#18

System Message - July 9, 2009 - 09:40
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.