Smarty 2.6.26

Well no thanks to jobo for peaking my interest about Smarty in the other thread about cache, I decided to have a look at the “latest stable version” of Smarty which is 2.6.26. After comparing the files, I found that a few bugs were fixed and also added code. As far as the configurations go, the ones that CSC are using are the default configs. There was only one file that I had to comment out a line for it to work properly for the admin section.



Anyway, I am testing the newest version and if anyone else is interested in testing it themselves, I have attached the files. Upload the attached file to /public_html/lib/, rename your original file to something like “templater2618” in case you want to easily go back to it, then extract the compressed file.



If anyone is brave enough to try it out, report back here with your findings.:stuck_out_tongue:

templater.zip

I knew you were going to be first! :slight_smile:



Bob

Are you brave enough to test it jobo?

I just installed it and started testing.



What did you need to comment out?



Bob

It’s already fixed in the file.



Edit: If you want to know exactly, it is in /public_html/lib/templater/internals/core.load_plugins.php It is commented out in the original as well.


// output error
[COLOR="Red"]//[/COLOR]$smarty->_trigger_fatal_error('[plugin] ' . $_message, $_tpl_file, $_tpl_line, __FILE__, __LINE__);




Edit2: It was interfering with a function in the main.tpl in admin.

I am still testing but I have not yet found any problems. It would be nice to know if the developers had coded around bugs in 2.6.18 - those would be the things most likely to break.



I wonder why they have not considered dropping in a newer version of Smarty - 2.6.18 is nearly 3 years old.



Anyone else had a play with this yet?



Bob

From what I could tell from comparing the files the bugs are still in the original.



I was hoping that someone who was having major problems with cache causing errors would try this to see if it solved their problems.



But yeah, so far I haven’t experienced any problems whatsoever. The only problems I saw before was the site slowing down to a crawl after awhile so I am going to abstain from clearing the cache for awhile to see how it does.

jobo, are you still testing this?



I had to clear cache today because I needed to regenerate an updated sitemap but it’s been working flawlessly.

Yeah, I am still testing - so far, no issues. It appears it could be a clean drop-in for 2.6.18 with the benefit of some bugfixes. You would think they would want to sync to the current stable release at least once a year - 2.6.18 is three years old.



I wonder if they are instead thinking about moving to Smarty 3.0 once it is stable (and after letting a few pioneers take the arrows). That will likely require some recoding on their end but might provide more benifits.



Bob

To reply in one line: You would think and I doubt it. LOL



There really isn’t much they have added to nor removed from it aside from the line that was commented out. I have even added this to 1.3.5 with one additional change. The 1.3.5 version uses 2.6.16.

Any updates on this, Mr. Tool Outfitter? Working without a hitch still?



I’m about to make the changes to my cart while I’m still in the testing phase.

Yep, it is working flawlessly. Give it a try.

thanks Tools Outfitter and jobosales for starting this topic. I’m going to try the zip file which Tools have attached and see how it goes. ^^


[QUOTE] You would think they would want to sync to the current stable release at least once a year - 2.6.18 is three years old.[/QUOTE]


[QUOTE]To reply in one line: You would think and I doubt it. LOL[/QUOTE]



LOL :lol:



Yeah one would think… but sadly its only wishful thinking on our parts.



Not only is the Smarty version used 3 years old. The jQuery version used is also 1.2.6, 2 major versions lacking behind the current jQuery version.



My opinion is that most probably they do not wish to attempt looking into the new versions since the version they are using works for their purposes. (until someone complains about it)

Maybe for fear that upgrading a version will break their code and cart, which will then cost them time and effort to fix it. (ironically, it might make them understand our frustrations in upgrading cscart versions so frequently then).

At least they have acknowledged that their jQuery is dated and that they plan to replace it. We need newer versions made available to enable us add new features to our carts.



I think that the Smarty engine is such a black box to most people that few would even investigate updating it so the developers feel little incentive to do so and, as nodame said, they are concerned that it might introduce additional problems. Like TO, I have found no problems yet. It would be great if we could get some more people testing this to confirm it introduces no new issues - maybe we could then convince them to upgrade.



Bob

Crashed on me :frowning:



```php Warning: require(/home/b2bccnet/public_html/lib/templater/Smarty.class.php) [function.require]: failed to open stream: No such file or directory in /home/b2bccnet/public_html/core/class.templater.php on line 21



Fatal error: require() [function.require]: Failed opening required ‘/home/b2bccnet/public_html/lib/templater/Smarty.class.php’ (include_path=‘/home/b2bccnet/public_html/lib/pear/.:/usr/lib/php’) in /home/b2bccnet/public_html/core/class.templater.php on line 21 ```

[quote name=‘Noman’]Crashed on me :frowning:

[/QUOTE]

Did you verify that /lib/templater/Smarty.class.php exists?



Bob

There was a Templater folder within another Templater folder. Silly me. Thanks Bob.



So far, so good.

[quote name=‘Noman’]There was a Templater folder within another Templater folder. Silly me. Thanks Bob.



So far, so good.[/QUOTE]

Glad you got it sorted. Hopefully others will chime in with good results too.



Bob

Glad we have some others willing to test it but at this point, I am confident with it.



I may have another look at jquery when I get some time.

Tested with the upgraded version of Smarty from Tool Outfitters. ^^

Works without any problems so far!