I just upgraded from D5.16 to D5.17 and the result was a broken AF ..
Initially after the upgrade none of the AF files could be found. I was able to correct some of this by moving the AF them files from \blumarine\blue_lagoon to \bluemarine (moved them up one level, into the theme folder). But this has left me with the following errors which is preventing the author pane info from showing, and also preventing any listings in the forum-list pages (individual posts still show) :
phptemplate.engine was instructed to override the advf_forums theme function, but no valid template file was found
phptemplate.engine was instructed to override the advf_forum_list theme function, but no valid template file was found.
phptemplate.engine was instructed to override the advanced_forum_forum_legend theme function, but no valid template file was found.
phptemplate.engine was instructed to override the advf_forum_submitted theme function, but no valid template file was found.
etc..etc..
I've cleared cache, disabled/renabled the AF and Author Pane modules, cleared cache again, thrown rocks at the moon and howled - but no joy..
Comments
Comment #1
magibird commentedI am experiencing the same problem and noticed that phptemplate.engine was changed in the upgrade.
diff reveals the following:
260c260
< $arg = str_replace(array('/', '\\', '\0'), '', $arg);
---
> $arg = str_replace(array("/", "\\", "\0"), '', $arg);
379a380,383
> // Remove slashes or null to prevent files from being included from
> // an unexpected location (especially on Windows servers).
> $extension = str_replace(array("/", "\\", "\0"), '', $extension);
>
382a387
> $suggestion = str_replace(array("/", "\\", "\0"), '', $suggestion);
Perhaps this is related?
Comment #2
msupko commentedI can confirm that this is the culprit...I reverted phptemplate.engine to previous version and our forums are back.
Comment #3
michelleYes, that would do it for sure. This is not a bug in AF. Not my fault someone went and screwed with how template suggestions work on a verison that's supposed to be on maintenance. Frankly, I'm not sure how I'm going to get around this one. I might end up just having to drop AF for D5. I will take some time to investigate before I make that decision, though.
Michelle
Comment #4
michelleMore info: Looks like it's #396224: SA-CORE-2009-003 - Local file inclusion on Windows at fault. Since it's a security issue, getting the change in core reversed is unlikely to happen. :( I don't know what I'm going to do.
Michelle
Comment #5
MrGeek commentedExtra hot-chocolates if you come up with a good solution Michelle!
Comment #6
MGParisi commentedif we are not running one windows do we need the new phptemplate.engine?
Edit: I LOVE WHEN THEY PUT NEW IMPROVEMENTS INTO THE SYSTEM... (...As long as they dont break my install...)
Its about time the developers realize that Mike is their #1 Client! WHO IS WITH ME!
Can we get the security update without a complete overhaul of the system? We cant abandon the D5 branch yet!
Comment #7
michelleI don't know. I don't know much about security and don't really understand the issue that caused this. I'm just waiting to see if it gets fixed since it seems I'm not the only one that thinks removing the ability to have subdirectories is a bad thing.
Michelle
Comment #8
MGParisi commentedyea, I vote yes for sub directories!
Michelle For 2010 Drupaler President! Lets raise the funds and start the campaign!
Comment #9
michelleThis morning I had a conversation I had on IRC where I was basically told that just because something works doesn't mean it will continue to work unless it's documented. So we've got that camp vs those of us who think this is important functionality that needs to be preserved. Since I don't have the skills to fix the core issue myself, I'm in limbo waiting to see if someone else is able to do it.
In the mean time, here's a crude hack for people who need this fixed right now:
1) Copy all the style files to the root of your theme.
2) In advanced_forum.module, find the function
advanced_forum_path_to_style()and change the very last line fromreturn $style_path;toreturn path_to_theme();If you're using a Zen subtheme, make that path_to_subtheme().
I haven't tested this... Just looking at my code and I think that should work.
Michelle
Comment #10
MGParisi commentedYea, well I can document it... This is crazy... We bust our asses off for Drupal just as much as those writing the code, we are the consumers of this... Honestly Drupal Forums and Commenting system is a Joke. They NEED Advanced Forums, not the other way around.
This pisses me off as much as it does you Michelle!
I love Drupal, I really do, but I can tell you, its so much work to set it up right... and then they burn you on updates like this?
Its not that they go and improve things that bothers me, I love that, its their careless attitude that they have towards module developers when things break...
Some day I need to rant about Drupal, and what the true issues with it are...
Comment #11
sgdev commentedWow I've been going crazy all morning trying to figure out what I did wrong with AF (especially since I had not changed anything!!). Then I find this. Ugh.
Michelle, I tried your hack in #9 and doesn't work. It gets the CSS and template files pointed to the right location, but nothing is rendered to the page. Guess I need to roll back to D5.16 for now...
Comment #12
MrGeek commentedrolling-back just the phptemplate.engine file does the trick.
Comment #13
michelleOk, I can confirm that the patch in http://drupal.org/node/396224#comment-1544190 works. Yay! So I'm not going to change anything in AF but will leave this active until it's committed to core so people can find it.
Thanks to magibird for getting me pointed in the right direction.
Michelle
Comment #14
ckngConfirming the patch in http://drupal.org/node/396224#comment-1544190 works as well.
Comment #15
marcelduchamp commentedJust a newbie question :
The patch says :
I have never applied a patch, so what do we need to do to phptemplate.engine ?
How this patch has to be applied ?
The only difference between original 5.17 phptemplate.engine and the code in this patch are the - at the beginning of the line ;
does that mean that these lines have to be erased and that's all, all will be as before (like 5.16) ?
I have searched into the site for how to on patch applying but what I have found is a bit to difficult for newbies like me...
Sorry for my poor english...
Thank you for your attention.
Comment #16
michelleYes, the - means the line goes away and the + means the line is added.
Michelle
Comment #17
marcelduchamp commentedThank You Michelle for your answer :)
And Thank you very much for your Advanced Forum...
I'm fond of it and I would have been very disappointed if it had been put out of order by 5.17 - not ready yet to upgrade to 6.x ...
:)
Comment #18
juan_g commentedAbout applying patches, there is easy info (for Unix, Linux...) at:
http://drupal.org/patch/apply
http://en.wikipedia.org/wiki/Patch_(Unix)
Comment #19
liam mcdermott commentedLooking at the release notes for Drupal 5.18, this seems to have been fixed. I haven't tested it though.
Am looking forward to not seeing that nasty warning on the Advanced Forum project page any more! :)
Comment #20
michelleWell, the patched fixed it so I'm assuming 5.18 will as well. I'll be upgrading my site tonight and will close this once I confirm.
Michelle
Comment #21
davea commentedsubscribing
Comment #22
michelleConfirmed.
Michelle