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 :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
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 12:45 Go to next message
littleking is currently offline  littleking   United States
Messages: 187
Registered: January 2007
Karma: 2
Senior Member
add to buddy list
ignore all messages by this user
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 15:08 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 15:18 Go to previous messageGo to next message
littleking is currently offline  littleking   United States
Messages: 187
Registered: January 2007
Karma: 2
Senior Member
add to buddy list
ignore all messages by this user
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 15: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 15:32 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 15:33 Go to previous messageGo to next message
littleking is currently offline  littleking   United States
Messages: 187
Registered: January 2007
Karma: 2
Senior Member
add to buddy list
ignore all messages by this user
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 15: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 16:09 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 17:02 Go to previous messageGo to next message
littleking is currently offline  littleking   United States
Messages: 187
Registered: January 2007
Karma: 2
Senior Member
add to buddy list
ignore all messages by this user
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 18:12 Go to previous message
littleking is currently offline  littleking   United States
Messages: 187
Registered: January 2007
Karma: 2
Senior Member
add to buddy list
ignore all messages by this user
fixed! thanks!
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
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 Dec 16 17:45:23 EST 2017

Total time taken to generate the page: 0.00701 seconds