Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On my 7.x test site, I just discovered that node pages (and other pages) are apparently being indexed by rendering using the administrative theme rather than the default site theme (at least when I run cron from the Status Report page, which is running the administration theme). So the wrong blocks are being included in the "content" section of the page.
Comments
Comment #1
jhodgdonA fix for this is now in the 7.x-dev branch.
Comment #2
jhodgdonActually, a test needs to be written for this.
Comment #3
jhodgdonTest is added.
Comment #5
NicoDruif CreditAttribution: NicoDruif commentedI just ran into this same problem with the 7.x-1.2 version. I hope the dev version fixes this!
Comment #6
guictx CreditAttribution: guictx commentedHappens with latest dev when manually running cron from the status report page.
Doesn't happen with
drush cron
or when using the external link.Comment #7
jhodgdonAre you sure? What symptoms are you seeing?
Comment #8
guictx CreditAttribution: guictx commented1. After activating and configuring search by page I found discrepancies in search results between production and staging servers of a website we developed.
2. I tried reindexing a dozen times with different options, until I decided to look directly into the database where I found out that on the production server the HTML of the nodes in the
sbp_paths
table was quite different.3. Since the production server doesn't have drush I was running cron from the status report page, so I changed to using the external link.
4. Content was indexed with the correct theme and matched the indexed content on the staging server.
I'm on Drupal 7.22 with latest dev of search_by_page, using Rubik as admin theme and a custom built theme for the site. I'm also using the admin_theme module. There were no reported errors while indexing or searching the site.
Comment #9
jhodgdonThanks for the detailed report! I will look into it.
Comment #10
jhodgdonI am unable to reproduce this problem, running with the latest dev version of Search by Page.
To test it, I did the following:
a) I ran the automated test that I had created earlier for this issue, and it passed.
b) I manually did pretty much the same thing on a test site:
1. Set my theme to Bartik and set the admin theme to Seven.
2. Created a test block and put it into the Content region on Bartik but not on Seven.
3. Verified that on various node pages, the block I created was there.
4. Reset the search index.
5. Ran cron from the status report page until search was fully reindexed.
6. Verified that I could search for some text in my test block, and it came up in the search results.
c) Then I did the reverse:
1. Activated the test block for Seven, deactivated for Bartik.
2. Verified that the test block was being shown on the page for admin pages (i.e., in Seven) and not on Content pages (i.e., in Bartik).
3. Reset the search index.
4. Ran cron from the status report page until search was fully reindexed.
5. Verified that I could not search for the test block text.
So... I am not sure what is happening on your site, but it appears that it is working correctly on my test site.
Maybe it is the Admin Theme module that is the issue -- what exactly does it do that D7 doesn't do itself, since D7 has the administrative theme functionality built into it... Can you try disabling that module and see if that fixes your problem?
Comment #11
jhodgdonAt this point with no response in a year... I cannot reproduce this. Feel free to reopen if you have more information to add.