I am using Search by Page, and not Menu Blocks. When I run Cron or do a Search I receive the following:

Notice: Trying to get property of non-object in node_page_title() (line 2075 of /path/modules/node/node.module).

I am running in the following environment:
Drupal 7.12
Database system MySQL, MariaDB, or equivalent OK
Database system version 5.0.92-log OK
Database updates Up to date
PHP 5.2.17
Superfish library Installed
Unicode library PHP Mbstring Extension
Web server Apache
jQuery Update jQuery 1.5.2 and jQuery UI 1.8.11

I am running the following modules:
Advanced help 7.x-1.0
Calendar 7.x-3.2
Chaos tool suite (ctools) 7.x-1.0
Database search 7.x-1.0-beta2
Date 7.x-2.5
Easy Social 7.x-2.8
Entity API 7.x-1.0-rc2
Facet API 7.x-1.0-rc4
Features 7.x-1.0-rc2
Google Analytics 7.x-1.2
jQuery Update 7.x-2.2
Libraries API 7.x-1.0
Noggin 7.x-1.0
Organic groups 7.x-1.3
Panels 7.x-3.2
Profile 2 7.x-1.2
Search API 7.x-1.0
Search by Page 7.x-1.2
Superfish 7.x-1.8
Variable 7.x-1.2
Views 7.x-3.3
Wysiwyg 7.x-2.1
XML sitemap 7.x-2.0-rc1

I really like the search functionality of Search by page, but cannot get past the errors. Can you help?

Comments

jhodgdon’s picture

Status: Active » Postponed (maintainer needs more info)

That's a lot of modules...

Would it be possible for you to clone your site, and on the test version, try turning off some of the modules to see if you can narrow down which module is interacting badly with Search by Page to trigger this error? Also, maybe you can provide more information on your Search by Page configuration (are you using just the Node sub-module, for instance?).

bevision’s picture

These are the Search Modules in use. Search by Page Attachments is the only one turned off.

Database search 7.x-1.0-beta2
Search API 7.x-1.0 Provides a generic API for modules offering search capabilites.
Search by Page 7.x-1.2
OFF: Search by Page Attachments 7.x-1.2
Search by Page Nodes 7.x-1.2
Search by Page Paths 7.x-1.2
Search by Page Users 7.x-1.2
Search facets 7.x-1.0
Search views 7.x-1.0

Search by Page Config:
Environment: new
URL path: search_pages
Number of items to index per cron run - 100
Default environment - new
Search tab name: Pages

Active search modules (where X = selected)
Advanced help
X Node
X Search by Page
X User

Default search module
Advanced help
Node
X Search by Page
User

Cloning and turning off modules will take quite a bit of time. I am running this as a dev site on godaddy and do not have a local environment available right now.

jhodgdon’s picture

If it's a dev site, maybe you can just go ahead and turn off some of the contrib modules temporarily and see if your problem goes away? Modules like WYSIWYG, Libraries API, and Advanced Help are unlikely to be the problem -- only modules that put things on output pages that you are indexing in Search by Page.

bevision’s picture

I am trying your suggestion. Also updated Core to 7.14. I noticed that when running in maintenance mode cron did not generate errors.

Tried turning off the following Modules. No fix there...
Database search 7.x-1.0-beta2
Search API 7.x-1.0
OFF: Search by Page Attachments 7.x-1.2
Search facets 7.x-1.0
Search views 7.x-1.0

bevision’s picture

Also tried turning off

XML sitemap 7.x-2.0-rc1
XML sitemap custom 7.x-2.0-rc1
XML sitemap engines 7.x-2.0-rc1
XML sitemap internationalization 7.x-2.0-rc1
XML sitemap menu 7.x-2.0-rc1
XML sitemap node 7.x-2.0-rc1 Adds content links to the sitemap.
XML sitemap taxonomy 7.x-2.0-rc1 Add taxonomy term links to the sitemap.
XML sitemap user

No luck

jhodgdon’s picture

The modules I would try next for testing turning them off [some of them I put on this list because I don't have a clue what they are/do]:
Easy Social 7.x-2.8
Noggin 7.x-1.0
Organic groups 7.x-1.3
Profile 2 7.x-1.2
Superfish 7.x-1.8
Variable 7.x-1.2

bevision’s picture

Tried turning these off. OG took a while because of the fileds placed in user data needed to be deleted, so I had to make sure I had a good db back up so I can restore later.

Organic groups
Organic groups access control
Organic groups context
Organic groups field access
Organic groups migrate
Organic groups register
Organic groups UI
Profile2 group access

All of the above have remained off.

Just turned off
Easy Social
Noggin
All of the above have remained off. No change...

bevision’s picture

Ok, Turned off
Profile 2
variable
All of the above have remained off. No change...

Turned off
Superfish
Entity API
Entity tokens
Ran update.php, and then cron. No Errors! Searched - no errors! Going back to turn on one at a time...

bevision’s picture

Ok, we may be on to something here. Turned Superfish on and got errors. I think it may be menu content displayed only when it is turned on. Checking.

bevision’s picture

Haven't been able to isolate any specific content or pages yet. I am regrouping to try to figure out a strategy. Note that Superfish is one of the first modules I added and it and search by page co-existed nicely for some time. Looks like the errors started showing up at around the time of the 7.12 update? Any ideas?

jhodgdon’s picture

Title: Cron and Search report: Trying to get property of non-object in node_page_title() (line 2075 » With Superfish module - getting errror "Trying to get property of non-object in node_page_title()" in cron/search
Status: Postponed (maintainer needs more info) » Active

Interesting. Since both Menu Blocks and Superfish are triggering the same error message, there could be a common cause, or maybe at least a common solution.

Someone recently posted a core hack that "fixes" the problem on the menu blocks issue:
#1187776: Use with Menu Block causes PHP notice and active trail problems

I wonder if Search by Page could implement a work-around that would fix it without hacking core though. It might be possible.

jhodgdon’s picture

Status: Active » Fixed

I just committed a fix for this issue to the 7.x development version of this module. Basically, Search by Page is now only rendering the content region blocks, so it should avoid all the problems in Menu Block and Superfish when the menus in other regions are attempted to be rendered. (It definitely fixes the Menu Blocks issue from #1187776: Use with Menu Block causes PHP notice and active trail problems and I am reasonably sure it will fix this one too.)

Status: Fixed » Closed (fixed)

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

rooby’s picture

In case people are searching on this error message, there is also a drupal core problem that causes this error message in a number of circumstances.

See #1697570: _menu_load_objects() is not always called when building menu trees