[SOLVED] UDT error after upgrade to 1.11

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

[SOLVED] UDT error after upgrade to 1.11

Post by rotezecke »

hi,
I previously posted upgrade problems here:
http://forum.cmsmadesimple.org/viewtopi ... =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: Select all

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: Select all

#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: Select all

//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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: UDT error after upgrade to 1.11

Post by calguy1000 »

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
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: UDT error after upgrade to 1.11

Post by rotezecke »

so this post is no longer valid?
http://wiki.cmsmadesimple.org/index.php ... _.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.
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: UDT error after upgrade to 1.11

Post by Jos »

You can update the wiki and add the warning yourself. You can login with your forum username/password ;)
bess
Language Partners
Language Partners
Posts: 282
Joined: Thu Dec 18, 2008 9:37 am
Location: Bretagne

Re: UDT error after upgrade to 1.11

Post by bess »

a solution from a french member : Kraygoon (thanks to him)

http://www.cmsmadesimple.fr/forum/viewt ... 632#p29632
$smarty = cmsms()->GetSmarty();
$smarty_data = "{menu}";
@ob_start();
echo $smarty->display('string:'.$smarty_data) ;
$_contents = @ob_get_contents();
@ob_end_clean();
echo $_contents;
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: UDT error after upgrade to 1.11

Post by calguy1000 »

That is totally redundant

Code: Select all

$smarty = cmsms()->GetSmarty();
$smarty_data = "{menu}"; // why?
$smarty->display('string:'.$smarty_data) ;
Edit:The echo statement was redundant.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
bess
Language Partners
Language Partners
Posts: 282
Joined: Thu Dec 18, 2008 9:37 am
Location: Bretagne

Re: UDT error after upgrade to 1.11

Post by bess »

thank you calguy1000 ;)
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: [SOLVED] UDT error after upgrade to 1.11

Post by rotezecke »

Thank you.
Locked

Return to “[locked] Installation, Setup and Upgrade”