1

I have upgraded a website from D6 -> D7 using Drush site-upgrade command. Using a bash script it takes a drush archive-dump of a D6 site, assures it's at the latest version of D6 and upgrades it to Drupal 7. After the upgrade I apply a new theme and configuration via the Configuration module.

After the upgrade if I do a re-index of Search I see the following output:

drush cron -v
Initialized Drupal 7.33 root directory at                              [notice]
/var/www/2014/comparative_literature/snapshot/dest_www
Initialized Drupal site comparative-literature at                      [notice]
sites/comparative-literature
Indexing node 1.                                                    [ok]
Indexing node 2.                                                    [ok]
Indexing node 3.                                                    [ok]
Indexing node 4.                                                    [ok]
Indexing node 5.                                                    [ok]
Indexing node 6.                                                    [ok]
Indexing node 7.                                                    [ok]
Indexing node 8.                                                    [ok]
Indexing node 9.                                                    [ok]
Undefined index: email email.module:109                                [notice]
Undefined index: email email.module:109                                [notice]
Undefined property: stdClass::$uri file.module:737                     [notice]
Undefined property: stdClass::$filemime file.module:775                [notice]
Undefined property: stdClass::$filemime file.module:819                [notice]
Undefined property: stdClass::$filemime file.module:862                [notice]
Undefined property: stdClass::$filemime file.module:834                [notice]
Undefined property: stdClass::$filemime file.module:834                [notice]
Undefined property: stdClass::$filemime file.module:834                [notice]
Undefined property: stdClass::$filemime file.module:834                [notice]
Undefined property: stdClass::$filemime file.module:744                [notice]
Undefined property: stdClass::$filesize file.module:744                [notice]
Undefined property: stdClass::$filename file.module:750                [notice]
Indexing node 15.                                                   [ok]
Undefined index: email email.module:109                                [notice]
Undefined index: email email.module:109                                [notice]
Undefined property: stdClass::$uri file.module:737                     [notice]
Undefined property: stdClass::$filemime file.module:775                [notice]
Undefined property: stdClass::$filemime file.module:819                [notice]
Undefined property: stdClass::$filemime file.module:862                [notice]
Undefined property: stdClass::$filemime file.module:834                [notice]
Undefined property: stdClass::$filemime file.module:834                [notice]
Undefined property: stdClass::$filemime file.module:834                [notice]
Undefined property: stdClass::$filemime file.module:834                [notice]
Undefined property: stdClass::$filemime file.module:744                [notice]
Undefined property: stdClass::$filesize file.module:744                [notice]
Undefined property: stdClass::$filename file.module:750                [notice]
Indexing node 16.                                                   [ok]
Indexing node 18.                                                   [ok]
Indexing node 19.                                                   [ok]
Indexing node 20.                                                   [ok]
Indexing node 21.                                                   [ok]
Indexing node 22.                                                   [ok]
Indexing node 23.                                                   [ok]
Indexing node 24.                                                   [ok]
Indexing node 25.                                                   [ok]
Indexing node 26.                                                   [ok]
WD cron: Cron run completed.                                           [notice]
Cron run successful.                                                [success]
Command dispatch complete                                              [notice]

This site is simple like 3 content types which are Basic Page, Faculty and News items. Pages index fine above, and the News and Faculty throw errors do to file (people headshots) and email field issues I guess ...

But, when I use the site to Edit a page or uplaod an image to the Faculty member it appears to work fine. The search index is Built and content is in the tables but nothing ever returns from searching for say academics and its a keyword in the built index found in basic Drupal "Page" content type nodes.

The search page sometimes spits out notices such as (related to file field issues, email field issues, etc):

Notice: Undefined index: email in email_field_formatter_view() (line 109 of /project/drupalwww/sites/mysite/modules/contrib/email/email.module).
Notice: Undefined index: email in email_field_formatter_view() (line 109 of /project/drupalwww/sites/mysite/modules/contrib/email/email.module).
Notice: Undefined property: stdClass::$uri in theme_file_link() (line 737 of /project/drupalwww/modules/file/file.module).
Notice: Undefined property: stdClass::$filemime in theme_file_icon() (line 775 of /project/drupalwww/modules/file/file.module).
Notice: Undefined property: stdClass::$filemime in file_icon_path() (line 819 of /project/drupalwww/modules/file/file.module).
Notice: Undefined property: stdClass::$filemime in file_icon_map() (line 862 of /project/drupalwww/modules/file/file.module).
Notice: Undefined property: stdClass::$filemime in file_icon_path() (line 834 of /project/drupalwww/modules/file/file.module).
Notice: Undefined property: stdClass::$filemime in file_icon_path() (line 834 of /project/drupalwww/modules/file/file.module).
Notice: Undefined property: stdClass::$filemime in file_icon_path() (line 834 of /project/drupalwww/modules/file/file.module).
Notice: Undefined property: stdClass::$filemime in file_icon_path() (line 834 of /project/drupalwww/modules/file/file.module).
Notice: Undefined property: stdClass::$filemime in theme_file_link() (line 744 of /project/drupalwww/modules/file/file.module).
Notice: Undefined property: stdClass::$filesize in theme_file_link() (line 744 of /project/drupalwww/modules/file/file.module).
Notice: Undefined property: stdClass::$filename in theme_file_link() (line 750 of /project/drupalwww/modules/file/file.module).
Notice: Undefined index: text_processing in _text_sanitize() (line 319 of /project/drupalwww/modules/field/modules/text/text.module).
Notice: Undefined index: text_processing in _text_sanitize() (line 319 of /project/drupalwww/modules/field/modules/text/text.module).

So far as I can tell there are no Errors, only Notices during the upgrade process. Well there is 1 error from Serial Field usage on the site -- but the project page says to ignore it. The CCK Migration shows all fields are migrated although an email and link field loose association with their original content type maybe?: enter image description here

I'm so annoyed! I get alot of Notices but nothing is a fatal error, and the site is Editable as a logged in user so far as I can tell. But I'd love to fix search (and as a bonus get rid of the Notices) ...

Any pointers, thoughts, tips, prayers welcome. :D

1 Answer 1

0

Ok, so I was kinda stupid and functions suck. Let me explain ...

At some point in my development of a D7 theme for my site upgrade I created a function:

function MYTHEME_preprocess_search_result(...) { ...}

to theme search results. It wasn't working right so I commented out it's body:

function MYTHEME_preprocess_search_result($vars) {
  #dpm($vars);
  #dpm($vars['info']);
  #unset($vars['info']);
}

But in my function above I'm missing a Pass-By-Reference operator on the $vars parameter. The proper function signature is:

function MYTHEME_preprocess_search_result(&$vars) { /* ... */ }

By merely commenting out the body of the function I left the function itself consume $vars and never return any results (due to the pass by reference operator missing) thus causing every search to say "No search results found" -- but not raise any errors.

Note:

  • I saw my error after I used Xdebug and some targeted breakpoints to track the results in functionn search_view for example from a search form HTTP POST.
  • I say functions suck because if this was an Object Oriented method then an IDE would be able to say the signature was erroneous; relying on hook functions created from macros I think is kinda silly.
  • Maybe there were other ways to check this like examine the previous Git commit, but to me this type of bug is really really hard to track.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.