Object of class stdClass could not be converted to string in .../public_html/modules/pathauto/pathauto.inc on line 147.
This has only started to happen since I upgraded CCK to 1.9, but I wasn't sure where or how to address it.
These are the lines in question in Pathauto:
foreach ($punctuation as $name => $details) {
$action = variable_get('pathauto_punctuation_'. $name, 0);
// 2 is the action for "do nothing" with the punctuation
if ($action != 2) {
// Slightly tricky inline if which either replaces with the separator or nothing
$output = str_replace($details['value'], ($action ? $separator : ''), $output); //Line 147
}
}
Comments
Comment #1
gregglesDoes it happen for all content types or only for a specific content type? What are the cck fields on the content types impacted.
Can you do some debugging and print out the $output, $details['value'], $action, and $separator right before line 147? Do something like
drupal_set_message(print_r($variable_name, TRUE));For each variable. That should help identify which variable is an object and causing the problem.
Comment #2
gregglesEasier to find title...
Comment #3
icecreamyou commentedI'm pretty short on time right now, but will try to do the debugging soon - if not today then within a few days.
If it makes any difference, I'm also getting this error (though less frequently) for token.module line 188:
...I don't know if that tells you anything.
It's also difficult to debug because I don't know when/how this is happening.
Comment #4
icecreamyou commentedGetting the same message for relatedlinks so I'm moving this to CCK, because I've only had this error since I upgraded to 1.9.
Comment #5
yched commentedThe information asked by greggles in #1 would still be useful.
Comment #6
icecreamyou commentedWell, I don't have time to debug right now, and my site is live so it could produce complications. But what I do know is not very helpful: I get the message on any user profile-related page or any node-related page. But it doesn't happen on every visit to any given page - just sometimes, at apparently random times.
Comment #7
gregglesThere are basically three ways that bugs like this get "fixed":
1) Someone else is also struck by it (and maybe many more people are) and then with the commonalities in the setups and the debugging information one of them provides it is fixed
2) The original poster provides the debugging information required
3) After 2 weeks of sitting "needs more info" it gets marked as "closed" and the problem never actually goes away :(
I'm just relating that in case you were unaware.
Comment #8
icecreamyou commentedI know. I've been *really* busy this week though. It might be Friday afternoon before I can debug... sorry for the delay. :-/
I did discover, however, that the error only occurs for logged-in users.
Comment #9
icecreamyou commentedI won't have time to debug this, so I'm closing the issue. If I ever figure out what the problem actually is I'll reopen it.
Comment #10
icecreamyou commented