Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Had a weird bug where $existing_path = array_shift($theme_registry[$template]['theme paths']); was telling me it wasn't an array. Installed devel to dsm it and the error went away. Uninstalled devel and the error didn't come back. Bizarre.
Michelle
Comments
Comment #1
psicomante CreditAttribution: psicomante commentedonly in 6.x-dev?
Comment #2
MichelleI don't know. That's the version I saw it in.
Michelle
Comment #3
MichelleConfirmed bug as reported in #355191: warning: array_unshift()
Michelle
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedI have the same problem.
Comment #5
likewhoa CreditAttribution: likewhoa commentedconfirmed here with -dev on drupal 6.8.
Comment #6
MichelleOk, folks, it's obviously a bug. Really don't need more confirmation. I'll fix it when I have time.
Michelle
Comment #7
MichelleComment #8
bcn CreditAttribution: bcn commentedI was getting this error (with Adv. Forum 6.x-1.0-unstable1 ), and after some debugging, I figured out that author pane was not installed... Obviously after installing author pane (latest dev) the error goes away.
Comment #9
MichelleSetting status back. There's no patch in #8. Also giving it a slightly better title since it seems to have nothing to do with devel but simply the act of installing a module fixes it. Unfortunately I didn't copy the exact error down because I wasn't expecting it to disappear when I installed devel to debug it. :(
Not sure when I'll get to this. Sorry, folks, but I'm getting paid at the moment to work on APK and AF is all on my own time which is non existant at the moment.
Michelle
Comment #10
dturover CreditAttribution: dturover commentedI first experienced the same problem on upgrading advanced forums from alpha16 to unstable1 after upgrading core from 6.8 to 6.9. It showed up on the upgrade.php and also appears on the admin modules page. The problem is only semi-repeatable since the function advanced_forum_theme_registry_alter that triggers it is not always hit on a reload, but reload enough times and it will come back.
The problem occurs when $template='author_pane'. Compare to the successful result with an existing $template:
DEBUG: in template forum_submitted theme registry contains:
'template' => 'modules/forum/forum-submitted'
'arguments' => 'Array'
'type' => 'module'
'theme path' => 'modules/forum'
'theme paths' => 'Array'
'preprocess functions' => 'Array'
DEBUG: Done debugging.
DEBUG: in template author_pane theme registry contains:
'theme paths' => ''
DEBUG: Done debugging.
This is the case for both the shift and unshift errors.
I am having a similar issue with the new version in that the author pane does not appear in forum posts and comments, and this error appears:
Both problems went away after installing and activating the author pane module as recommended by noahb.
Comment #11
MichelleWell, you're definitely going to have problems if you don't install author pane. So let's eliminate that from the equation. What I'm trying to nail down is why this crops up when author pane is installed. Can anyone else repro that? I only hit it once on a new dev site and it disappeared when I installed devel to debug it. :(
Michelle
Comment #12
MichelleOk, I figured out what's going on. It is caused by author pane not being enabled after all. The reason I was confused is that author pane is a requirement of AF and therefore has to be enabled. And, for me, the error appeared to go away when I installed devel as I already had author pane installed. But what actually happened was that author pane was there but it doesn't get enabled automatically right away when you update AF. By enabling devel, I was resubmitting the module page which must have made it go "hey, wait a sec, I need that module". LOL
So, the short of it is that this bug happens when you don't have AP which normally should never happen. Because it evidentally can happen in this one circumstance, I put in an extra check to avoid errors.
Michelle
Comment #13
Michelle