Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
The $data array is one iteration deeper than the logic is expecting. By changing the foreach loop i have managed to get it to work, however im new to Drupal and mysite so not sure if this is the best solution.
Patch attached.
Comment | File | Size | Author |
---|---|---|---|
#3 | mysite.module_3.patch | 479 bytes | a_c_m |
default.php_.patch | 603 bytes | a_c_m |
Comments
Comment #1
agentrickardThat $data array should be properly prepared before it gets to the layout stage, so this is likely not the right fix. If there is an error, it's in
mysite_prepare_columns()
.This issue (or a variant of it) keeps coming up. I think you have encountered an edge case, so more details about this error is needed. I can't test the patch until I can replicate the error.
- For what users (and roles) does this error occur?
- Whose mysite page are they looking at?
- What permissions do they have?
- What content exists in the mysite page?
- What page regions is that content assigned to?
A URL (and site access) or series of screenshots will be required.
Before continuing, check these dead issues:
http://drupal.org/node/168317
http://drupal.org/node/153570
http://drupal.org/node/157164
Comment #2
agentrickardComment #3
a_c_m CreditAttribution: a_c_m commentedYour questions :
- For what users (and roles) does this error occur?
Super user
- Whose mysite page are they looking at?
Their own
- What permissions do they have?
All
- What content exists in the mysite page?
2 droplets
- What page regions is that content assigned to?
One left, one right.
I dug a little further and to me the current code in mysite_prepare_columns() seems correct.
The problem as far as i see is that the $new array is expected to hold an array for each of the content areas, however the default.php expects to be given just an array of content direct, not an array within an array.
So the options seem to be :
In default.php tell it to select the first array element (which will be the 'main' content area) in the foreach.
or
In mysite.module you can add a else to the end of mysite_prepare_columns() to correctly format the array when $cols <= 1 (attached patch).
Or am i on totally the wrong track?
I am in #drupal if you want a more interactive discussion.
Comment #4
agentrickardNope, you are absolutely correct.
I actually had this in earlier versions, but though the new array processing in mysite_prepare_columns() fixed it (see http://drupal.org/node/168317 for the history).
Obviously I was wrong.
It also appears that line 811 should be:
Instead of the current:
Which is a logic error on my part.
I don't have access to CVS right now, so no proper patch. This does need to get rolled and released, though.
And changing this in mysite_prepare_columns() means we don't need to update all the layout files. Though we might need to rethink the purpose of this function.
Thanks for the catch.
Comment #5
agentrickardI will roll a 5.x.2.13 release tonight to fix this error.
Thanks again/
Comment #6
a_c_m CreditAttribution: a_c_m commentedGlad to be of help.
I sent you a message via the contact form on your profile - which i hope got to you.
Comment #7
agentrickardCommitted to HEAD and released in 5.x.2.13
Comment #8
(not verified) CreditAttribution: commented