FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Error after upgrade to 3 when click on template editor
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Error after upgrade to 3 when click on template editor [message #160444] Mon, 14 September 2009 16:45 Go to next message
littleking is currently offline  littleking   United States
Messages: 187
Registered: January 2007
Karma: 2
Senior Member
Warning: Cannot modify header information - headers already sent by (output started at /homepages/35/d196178364/htdocs/huntohio/adm/admpanel.php:4) in /homepages/35/d196178364/htdocs/huntohio/adm/admtemplates.php on line 20
Re: Error after upgrade to 3 when click on template editor [message #160454 is a reply to message #160444] Mon, 14 September 2009 19:08 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Here is the fix:

$ cvs diff -ua admtemplates.php
Index: admtemplates.php                
===================================================================
RCS file: /forum21/install/www_root/adm/admtemplates.php,v
retrieving revision 1.1
diff -u -a -r1.1 admtemplates.php
--- admtemplates.php    7 Sep 2009 15:49:52 -0000       1.1
+++ admtemplates.php    14 Sep 2009 19:03:53 -0000
@@ -14,13 +14,13 @@
        fud_use('compiler.inc', true);
        fud_use('theme.inc', true);

-       require($WWW_ROOT_DISK . 'adm/admpanel.php');
-
        if (isset($_POST['tname'], $_POST['tlang'], $_POST['btn_edit'])) {
                header('Location: tmpllist.php?tname='.$_POST['tname'].'&tlang='.$_POST['tlang'].'&'.__adm_rsidl);
                exit;
        }

+       require($WWW_ROOT_DISK . 'adm/admpanel.php');
+
        /* Limit theme names to sane characters */
        if (isset($_POST['newname'], $_POST['btn_create'])) {
                $_POST['newname'] = preg_replace('![^A-Za-z0-9_]!', '_', trim($_POST['newname']));


PS: I've applied it to CVS, but CVSTrac somehow doesn't show it.
Re: Error after upgrade to 3 when click on template editor [message #160455 is a reply to message #160454] Mon, 14 September 2009 19:18 Go to previous messageGo to next message
littleking is currently offline  littleking   United States
Messages: 187
Registered: January 2007
Karma: 2
Senior Member
now when i click edit, nothing happens

**/

        require('./GLOBALS.php');
        fud_use('adm.inc', true);
        fud_use('compiler.inc', true);
        fud_use('theme.inc', true);

        require($WWW_ROOT_DISK . 'adm/admpanel.php');

        /* Limit theme names to sane characters */
        if (isset($_POST['newname'], $_POST['btn_create'])) {
                $_POST['newname'] = preg_replace('![^A-Za-z0-9_]!', '_', trim($_POST['newname']));
        } else {
                $_POST['newname'] = '';
        }

[Updated on: Mon, 14 September 2009 19:20]

Report message to a moderator

Re: Error after upgrade to 3 when click on template editor [message #160458 is a reply to message #160455] Mon, 14 September 2009 19:32 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
You haven't applied the patch properly.
Re: Error after upgrade to 3 when click on template editor [message #160459 is a reply to message #160458] Mon, 14 September 2009 19:33 Go to previous messageGo to next message
littleking is currently offline  littleking   United States
Messages: 187
Registered: January 2007
Karma: 2
Senior Member
mind being a little more verbose in your explanation?

       require($WWW_ROOT_DISK . 'adm/admpanel.php');

        /* Limit theme names to sane characters */
        if (isset($_POST['newname'], $_POST['btn_create'])) {
                $_POST['newname'] = preg_replace('![^A-Za-z0-9_]!', '_', trim($_POST['newname']));

        /* Limit theme names to sane characters */
        if (isset($_POST['newname'], $_POST['btn_create'])) {
                $_POST['newname'] = preg_replace('![^A-Za-z0-9_]!', '_', trim($_POST['newname']));
        } else {
                $_POST['newname'] = '';
        }



yeilds:

Parse error: syntax error, unexpected $end in /homepages/35/d196178364/htdocs/huntohio/adm/admtemplates.php on line 139

[Updated on: Mon, 14 September 2009 19:46]

Report message to a moderator

Re: Error after upgrade to 3 when click on template editor [message #160460 is a reply to message #160459] Mon, 14 September 2009 20:09 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
The patch moves 2 lines of code (well, one and an empty line) a couple of lines down in the file. That's definitely not what you did. Maybe you should rather wait for the final release.
Re: Error after upgrade to 3 when click on template editor [message #160461 is a reply to message #160460] Mon, 14 September 2009 21:02 Go to previous messageGo to next message
littleking is currently offline  littleking   United States
Messages: 187
Registered: January 2007
Karma: 2
Senior Member
aahhhh i see... looks funny with the + in font of the blank line
Re: Error after upgrade to 3 when click on template editor [message #160464 is a reply to message #160461] Mon, 14 September 2009 22:12 Go to previous message
littleking is currently offline  littleking   United States
Messages: 187
Registered: January 2007
Karma: 2
Senior Member
fixed! thanks!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Upgraded to 2.8.1, Now Post Notification Emails are munged
Next Topic: Unable to Import Forum
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 12:57:15 GMT 2024

Total time taken to generate the page: 0.02131 seconds