Go Back   Pligg CMS Forum > Pligg Development > Bug Report

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-17-2008, 05:23 PM
cmstheme's Avatar
Pligg Donor
Pligg Version: 9.9
Pligg Template: Squaretle
 
Join Date: Jan 2007
Posts: 248
Thanks: 28
Thanked 40 Times in 30 Posts
[SOLVED] Warning: Template "NAME" does not exist!

Pligg Beta 9.9.5 cannot switch template using settemplate.php. When you type in your browser: http://domain.com/settemplate.php?template=yget or whatever template you will used it will show an error:
Quote:
Warning: Template "TEMPLATE_NAME" does not exist!
even though the template really exists in the /templates folder.
__________________
Join our Pligg Template Club now while prices are still cheap!
Reply With Quote
  #2 (permalink)  
Old 08-17-2008, 06:52 PM
chuckroast's Avatar
Coder/Designer
Pligg Version: 1.0
Pligg Template: ExpertVision
 
Join Date: Jun 2006
Location: PA
Posts: 2,397
Thanks: 171
Thanked 439 Times in 278 Posts
Hi cmstheme

Are you sure that the template_details.php is correct? I'm using 9.9.5 and have no problem switching in between templates.
__________________
Visit PliggPro the official Pligg Mods & Template Shop!

Reply With Quote
  #3 (permalink)  
Old 08-17-2008, 08:36 PM
cmstheme's Avatar
Pligg Donor
Pligg Version: 9.9
Pligg Template: Squaretle
 
Join Date: Jan 2007
Posts: 248
Thanks: 28
Thanked 40 Times in 30 Posts
My default template is a custom one. Then when I switched to "yget" I got the error. Here's the unmodified template_details.php of yget:
PHP Code:
<?php
    $template_info
['name'] = 'yGet'// do not use the _ character. use - instead
    
$template_info['desc'] = 'yGet';
    
$template_info['author'] = 'Pligg Team';
    
$template_info['support'] = 'http://forums.pligg.com/yget/';
    
$template_info['version'] = 0.995;
    
$template_info['designed_for_pligg_version'] = '9.9.5';
?>
Here's also another thread that encountered the error: After switching templates, yget still shows - please look at number 4 of his reply.

My Pligg 9.9.5 is a fresh install.
__________________
Join our Pligg Template Club now while prices are still cheap!
Reply With Quote
  #4 (permalink)  
Old 08-17-2008, 08:46 PM
chuckroast's Avatar
Coder/Designer
Pligg Version: 1.0
Pligg Template: ExpertVision
 
Join Date: Jun 2006
Location: PA
Posts: 2,397
Thanks: 171
Thanked 439 Times in 278 Posts
I still can't recreate this.. So can you give us some more details so I can see if I can't recreate this and see whats going on. Are you using the template management module to switch, or are you switching by the standard admin>config> template> method? Are you able to switch by using the settemplate.php?template=templatename method?

Thanks
__________________
Visit PliggPro the official Pligg Mods & Template Shop!

Reply With Quote
  #5 (permalink)  
Old 08-17-2008, 08:48 PM
cmstheme's Avatar
Pligg Donor
Pligg Version: 9.9
Pligg Template: Squaretle
 
Join Date: Jan 2007
Posts: 248
Thanks: 28
Thanked 40 Times in 30 Posts
The error is when you change template by cookie only: http://domain.com/settemplate.php?template=yget

I can switch template and there's no problem if I use admin>config> template> method

I have never tried template management module.
__________________
Join our Pligg Template Club now while prices are still cheap!
Reply With Quote
  #6 (permalink)  
Old 08-17-2008, 08:49 PM
cmstheme's Avatar
Pligg Donor
Pligg Version: 9.9
Pligg Template: Squaretle
 
Join Date: Jan 2007
Posts: 248
Thanks: 28
Thanked 40 Times in 30 Posts
I also copied the old settempalte.php file from 9.9.0 and still the problem occured.
__________________
Join our Pligg Template Club now while prices are still cheap!
Reply With Quote
  #7 (permalink)  
Old 08-17-2008, 08:56 PM
chuckroast's Avatar
Coder/Designer
Pligg Version: 1.0
Pligg Template: ExpertVision
 
Join Date: Jun 2006
Location: PA
Posts: 2,397
Thanks: 171
Thanked 439 Times in 278 Posts
It sounds like something could be corrupting the cookie.
Try this and see if you get a different result.

Go to line 37 of settemplate.php and look for

Code:
$main_smarty->assign('message', 'Warning: Template <b>"' . sanitize($_GET['template'],1) . '"</b> does not exist!');
Replace with
Code:
$main_smarty->assign('message', 'Warning: Template <b>"' . $_GET['template'] . '"</b> does not exist!');
__________________
Visit PliggPro the official Pligg Mods & Template Shop!

Reply With Quote
  #8 (permalink)  
Old 08-17-2008, 09:07 PM
cmstheme's Avatar
Pligg Donor
Pligg Version: 9.9
Pligg Template: Squaretle
 
Join Date: Jan 2007
Posts: 248
Thanks: 28
Thanked 40 Times in 30 Posts
In 9.9.0 and 9.9.5 this line:
PHP Code:
$main_smarty->assign('message''Warning: Template <b>"' $_GET['template'] . '"</b> does not exist!'); 
is the default one.

So I replace it with:
PHP Code:
$main_smarty->assign('message''Warning: Template <b>"' sanitize($_GET['template'],1) . '"</b> does not exist!'); 
There's no error that comes out, but still I cannot switch the template.
__________________
Join our Pligg Template Club now while prices are still cheap!
Reply With Quote
  #9 (permalink)  
Old 08-17-2008, 09:11 PM
chuckroast's Avatar
Coder/Designer
Pligg Version: 1.0
Pligg Template: ExpertVision
 
Join Date: Jun 2006
Location: PA
Posts: 2,397
Thanks: 171
Thanked 439 Times in 278 Posts
This is probably a dumb question but did you delete templates_c?
__________________
Visit PliggPro the official Pligg Mods & Template Shop!

Reply With Quote
  #10 (permalink)  
Old 08-17-2008, 09:16 PM
cmstheme's Avatar
Pligg Donor
Pligg Version: 9.9
Pligg Template: Squaretle
 
Join Date: Jan 2007
Posts: 248
Thanks: 28
Thanked 40 Times in 30 Posts
Yes, I have deleted the contents of templates_c.

When I compare the settemplate.php file of 9.9.0 and 9.9.5, the only difference is this:

9.9.0:
PHP Code:
if(file_exists("./templates/".$_GET['template']."/link_summary.tpl")){ 
9.9.5:
PHP Code:
if(file_exists("./templates/".$_GET['template']."/link_summary.tpl") && strpos('.'$_GET['template']) === 0){ 
I have also tried to use the settemplate.php from 9.9.0 and there's still the error.
__________________
Join our Pligg Template Club now while prices are still cheap!
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Permissioning required for backup to work? Swakoo General Help 3 10-09-2008 11:49 AM
upgrading to 9.6 yathosho Installation and Upgrade Help 6 07-08-2007 07:05 AM
cann't vote in pligg (buliding 802) haxhax Bug Report 27 03-10-2007 06:53 AM
Internal Server Error wagthis Bug Report 12 01-16-2007 05:20 PM
ERROR: my_base_url is not set. Please correct this using the admin panel. Then refres search Installation and Upgrade Help 7 11-14-2006 10:35 PM


Search Engine Friendly URLs by vBSEO 3.2.0