• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: [SOLVED] UDT error after upgrade to 1.11
PostPosted: Fri Aug 03, 2012 12:20 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Fri Apr 18, 2008 9:34 pm
Posts: 115
Location: Nimbin, Australia
hi,
I previously posted upgrade problems here:
http://forum.cmsmadesimple.org/viewtopic.php?f=3&t=62152
but I since fiddled around a fair bit and I think the syntax in some of my UDTs is to blame.

this is my error:
Code:
Error: at line 806 in file /my/path/cmsms/lib/smarty/sysplugins/smarty_internal_templatebase.php

Message: Call of unknown method '_compile_source'.

and in debug mode I also get:
Code:
#0 [internal function]: Smarty_Internal_TemplateBase->__call('_compile_source', Array)
#1 /var/www/cmsms/lib/classes/class.usertagoperations.inc.php(265) : eval()'d code(27): Smarty_CMS->_compile_source('temporary templ...', '{osc_cookie get...', NULL)
#2 /var/www/cmsms/tmp/templates_c/fc6d4015a0207ffcc00bd84890043ccaea513753.tpl_body.33.php(78): cms_user_tag_session_links(Array, Object(Smarty_CMS))
#3 /var/www/cmsms/lib/smarty/sysplugins/smarty_internal_templatebase.php(180): content_501b148008a4f5_14984023(Object(Smarty_Internal_Template))
#4 /var/www/cmsms/lib/classes/class.Smarty_CMS.php(329): Smarty_Internal_TemplateBase->fetch('tpl_body:33', 'p15', NULL, NULL, false, false, false)
#5 /var/www/cmsms/index.php(237): Smarty_CMS->fetch('tpl_body:33')
#6 {main}

I think the above means that my UDT {session_links} is to blame. I disabled the UDT in my template. after that a similar complaint came up about another UDT. I compared the UDTs and the one thing they have in common is they both call a {plugin} in a way I once copied from a tutorial:
Code:
//using a {tag} in a UDT
  $smarty = cmsms()->GetSmarty();
  $smarty_data = "{print showbutton=false text='Print Preview' includetemplate='true'}";
  $smarty->_compile_source('temporary template', $smarty_data, $_compiled );
  @ob_start();
  $smarty->_eval('?>' . $_compiled);
  $_contents = @ob_get_contents();
  @ob_end_clean();
  echo $_contents ;
//end of using {tag}


When I disable my UDTs that use the above code my new install seems to work. Can anyone see what's wrong with the (once fine) syntax?

Thank you for your input.

By the way, even after I stripped my old install of all disabled modules and reactivated (unused) core modules (MicroTiny,Theme Manager), the upgrade still failed, and I had to rename News module as described in the above mention post.

CMSMS 1.11
CMSMailer 5.2.1
FileManager 1.4.0
MenuManager 1.8.2
ModuleManager 1.5.5
News 2.12.7
Search 1.7.6
TinyMCE 2.10.1
CGSimpleSmarty 1.5.1
CGExtensions 1.29.1
CGBlog 1.9.8
CGFeedback 1.5.7
Captcha 0.4.5
FormBuilder 0.7.3
IE6Warning 1.03
Showtime 3.2
CMSPrinting 1.0.2

Server: Linux Debian Lenny 2.6.26-1-686 kernel
apache 2.2.9-10
mysql 5.0.51a-24
php 5.2.6-1


Last edited by rotezecke on Thu Aug 16, 2012 11:53 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: UDT error after upgrade to 1.11
PostPosted: Fri Aug 03, 2012 12:25 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 6587
Location: Fernie British Columbia, Canada
Smarty3 is significantly different than smarty2.

The hidden/private method _compile_source (which was never intended for the use as described in your post)... is no longer available.

I suggest you read the smarty manual now.

_________________
Follow me on twitter
--
if you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
----------------
Don't make me angry..... you won't like me when I'm angry....


Top
 Profile  
 
 Post subject: Re: UDT error after upgrade to 1.11
PostPosted: Fri Aug 03, 2012 1:59 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Fri Apr 18, 2008 9:34 pm
Posts: 115
Location: Nimbin, Australia
so this post is no longer valid?
http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel/Extensions/User_Defined_Tags#How_to_Execute_Smarty_Tags_from_A_User_Defined_Tag_.28UDT.29
Can that post be modified to
1) warn about smarty 3 incompatibility, and if possible,
2) a smarty 3 compatible solution.

Edit:
(my forum credentials are rejected on wiki for some reason).


Last edited by rotezecke on Fri Aug 03, 2012 3:42 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: UDT error after upgrade to 1.11
PostPosted: Fri Aug 03, 2012 3:23 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Wed Sep 05, 2007 8:03 pm
Posts: 3652
Location: The Netherlands
You can update the wiki and add the warning yourself. You can login with your forum username/password ;)

_________________
Get nice guestbook messages from your site visitors with the brand new Gbook module.
Integrate Piwik Web Analytics in your site admin with the Piwik module.
Extend your global site settings with the Custom Global Settings module.
The Fourth Dutch CMS Made Simple Workshop on April 9 2011 was great fun! Read all about it here
Announcement: The Fifth Dutch CMS Made Simple Workshop coming up?


Top
 Profile  
 
 Post subject: Re: UDT error after upgrade to 1.11
PostPosted: Thu Aug 16, 2012 8:47 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Dec 18, 2008 9:37 am
Posts: 260
Location: Bretagne
a solution from a french member : Kraygoon (thanks to him)

http://www.cmsmadesimple.fr/forum/viewt ... 632#p29632

Quote:
$smarty = cmsms()->GetSmarty();
$smarty_data = "{menu}";
@ob_start();
echo $smarty->display('string:'.$smarty_data) ;
$_contents = @ob_get_contents();
@ob_end_clean();
echo $_contents;

_________________
Cms Made Simple France


Top
 Profile  
 
 Post subject: Re: UDT error after upgrade to 1.11
PostPosted: Thu Aug 16, 2012 8:59 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 6587
Location: Fernie British Columbia, Canada
That is totally redundant

Code:
$smarty = cmsms()->GetSmarty();
$smarty_data = "{menu}"; // why?
$smarty->display('string:'.$smarty_data) ;


Edit:The echo statement was redundant.

_________________
Follow me on twitter
--
if you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
----------------
Don't make me angry..... you won't like me when I'm angry....


Top
 Profile  
 
 Post subject: Re: UDT error after upgrade to 1.11
PostPosted: Thu Aug 16, 2012 9:24 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Dec 18, 2008 9:37 am
Posts: 260
Location: Bretagne
thank you calguy1000 ;)

_________________
Cms Made Simple France


Top
 Profile  
 
 Post subject: Re: [SOLVED] UDT error after upgrade to 1.11
PostPosted: Thu Aug 16, 2012 11:54 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Fri Apr 18, 2008 9:34 pm
Posts: 115
Location: Nimbin, Australia
Thank you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting