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

jhodgdon’s picture

Status: Active » Fixed

A fix for this is now in the 7.x-dev branch.

jhodgdon’s picture

Title: Wrong theme being used to index pages » Wrong theme being used to index pages [needs test]
Status: Fixed » Needs work

Actually, a test needs to be written for this.

jhodgdon’s picture

Title: Wrong theme being used to index pages [needs test] » Wrong theme being used to index pages
Status: Needs work » Fixed

Test is added.

Status: Fixed » Closed (fixed)

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

NicoDruif’s picture

I just ran into this same problem with the 7.x-1.2 version. I hope the dev version fixes this!

guictx’s picture

Status: Closed (fixed) » Active

Happens with latest dev when manually running cron from the status report page.
Doesn't happen with drush cron or when using the external link.

jhodgdon’s picture

Are you sure? What symptoms are you seeing?

guictx’s picture

1. 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.

jhodgdon’s picture

Thanks for the detailed report! I will look into it.

jhodgdon’s picture

Status: Active » Postponed (maintainer needs more info)

I 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?

jhodgdon’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

At this point with no response in a year... I cannot reproduce this. Feel free to reopen if you have more information to add.