[fixed] v2.10.10: I am unable to preview templates!!!

Discuss, research, share, find, and solve bugs

Re: v2.10.10: I am unable to preview templates!!!

Postby Dragonrider » 9:50am, Sun 12 Jul, 2009

Chris's worked for me! YEA! Thanks Chris.

For those who are struggling to follow the instructions as laid out by Chris, what you need to do is make a backup copy of lists/admin/viewtemplate.php first, then edit the following line in the original file as below.

Change line 15 from:
Code: Select all
print previewTemplate($id,$_SESSION["logindetails"]["id"],nl2br($GLOBALS['I18N']->get('TempSample')));


to become:
Code: Select all
print previewTemplate($_GET['id'],$_SESSION["logindetails"]["id"],$GLOBALS['I18N']->get('TempSample'));


Save the file and all being well, you should now be able to view the templates in all their glory.
My sites:- http://wharfedalefestival.co.uk, http://ilkleygardeners.org.uk, http://emergencyaid.net, http://dragonrider.co.uk
Latest phpList version is now 3.0.12 (3 February 2015) and requires a minimum of MySQL 5.0 and PHP 5.3.x
Dragonrider
Moderator
 
Posts: 3460
Joined: 6:58am, Sun 02 Jul, 2006
Location: Ilkley, West Yorkshire, United Kingdom

Re: v2.10.10: I am unable to preview templates!!!

Postby imijit » 8:10pm, Mon 13 Jul, 2009

I noticed that the mySQL select query in the viewtemplate.bootstrap.php file was calling the table "template" but my tables are prefixed with "phplist_".

I changed
Code: Select all
$sql = "SELECT * FROM template WHERE id = $template_id";

to
Code: Select all
$sql = "SELECT * FROM phplist_template WHERE id = $template_id";


and the fix works.
imijit
phpList newbie
 
Posts: 1
Joined: 8:00pm, Mon 13 Jul, 2009

Re: v2.10.10: I am unable to preview templates!!!

Postby H2B2 » 5:16am, Fri 28 Aug, 2009

Dragonrider wrote:Chris's worked for me! YEA! Thanks Chris.

For those who are struggling to follow the instructions as laid out by Chris, what you need to do is make a backup copy of lists/admin/viewtemplate.php first, then edit the following line in the original file as below.

Change line 15 from:
Code: Select all
print previewTemplate($id,$_SESSION["logindetails"]["id"],nl2br($GLOBALS['I18N']->get('TempSample')));


to become:
Code: Select all
print previewTemplate($_GET['id'],$_SESSION["logindetails"]["id"],$GLOBALS['I18N']->get('TempSample'));


Save the file and all being well, you should now be able to view the templates in all their glory.


I can confirm the fix suggested by tipichris works fine for me too.

This is the patched file:
Attachments
viewtemplate.zip
Pached file: lists/admin/viewtemplate.php
with fix suggested by tipichris
(600 Bytes) Downloaded 768 times
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Re: v2.10.10: I am unable to preview templates!!!

Postby FadeFx » 10:04pm, Wed 18 Nov, 2009

Dragonrider wrote:Chris's worked for me! YEA! Thanks Chris.

For those who are struggling to follow the instructions as laid out by Chris, what you need to do is make a backup copy of lists/admin/viewtemplate.php first, then edit the following line in the original file as below.

Change line 15 from:
Code: Select all
print previewTemplate($id,$_SESSION["logindetails"]["id"],nl2br($GLOBALS['I18N']->get('TempSample')));


to become:
Code: Select all
print previewTemplate($_GET['id'],$_SESSION["logindetails"]["id"],$GLOBALS['I18N']->get('TempSample'));


Save the file and all being well, you should now be able to view the templates in all their glory.



thanx, this did it for me also....
FadeFx
phpLister
 
Posts: 9
Joined: 8:40pm, Thu 12 Nov, 2009

Re: v2.10.10: I am unable to preview templates!!!

Postby H2B2 » 2:31pm, Wed 14 Apr, 2010

Issue has been fixed in phpList v2.10.11
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Previous

Return to Bug Discussion

Who is online

Users browsing this forum: No registered users and 1 guest