Closed (fixed)
Project:
Page Title
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Jan 2011 at 08:51 UTC
Updated:
16 Mar 2011 at 10:33 UTC
Jump to comment: Most recent file
Comments
Comment #1
berdir*what* enabled modules?
This usually indicates that a module is calling user_load() in a wrong way, for example user_load(array('uid' => 1)), which is not supported anymore in D7.
Comment #2
olamaekle commentedAhh sorry. The modules I have enabled are:
I also have some core modules installed, but I don't think that could be the problem.
Comment #3
berdirTry to either disable each of those modules one by one and see if the error still happens once you figure out which module is responsible.
Then move this issue to the issue queue of that module
You can also search for "user_load(array" in sites/all/modules, might be faster if you have a tool that can search recursive through directories.
Comment #4
olamaekle commentedI got it. It's the Page Title 7.x-2.4-beta1 module that caused it. I'll try to look in the Page Title issue then
Comment #5
berdirMoving the issue.
Comment #6
nightowl77 commentedLine 29 and 34 of path_title/modules/user.page_title.inc is causing this
It calls "user_load" with an array as the first parameter instead of just the uid
Line 29:
Line 34:
Actually, can we not optimise this code and first check if a pattern was defined for the user (a variable get is much faster than a user_load), so the idea is that we only set "$types" if "$pattern != empty string". I'm asking because I'm not sure how "$types" is used in the rest of the code.
PS: Sorry I don't have my "patching enviroment" set up at the moment - moved to a new pc. Will submit a patch soon so that this can work with drush make's patching system.
Comment #7
nightowl77 commentedPatch attached :)
I also see there are tests for taxonomy and all sorts of things, but not a test for the user page. Once I've gone through a few "how to write simpletests for drupal" tutorials I'll try to tackle that as well.
Comment #8
berdirHaven't tested it, but the patch is correct and simple.
Comment #9
Cheek commented@nightowl77 patch works, thanks for the quick fix!
Comment #10
olamaekle commentedThe patch worked perfect.
Comment #11
Blooniverse commentedMay I ask when this patch will find its way into the 'Page Title' module? The current versions (2010-Nov-02) of it are quite old. In addition to that, other Drupalistas seem to suffer from this bug as well, see #1019936: Problem with array_flip() .
Thanks for the module! It is great.
Comment #12
claudio_c commentedThe patch worked thanks.
Comment #13
nicholasthompsonThanks guys - committed to dev. Will be in the next main release.
Comment #14
spunge commentedI am very new to Drupal.. how do I apply this patch?
Comment #15
Blooniverse commented@spunge: Instead of applying the patch, you are well advised to take the most current dev version of this module!
Comment #16
spunge commentedOk. Do I remove the current version of the module first or do I just overwrite and replace it with the current dev version?
Comment #17
Blooniverse commented... replace it -- unless the instructions are otherwise (usually when there is no upgrade path).