Forums / Cotonti / Extensions / Support / Slideshow no longer works since 0.6.6

xtemplate error

foxhound
#1 2010-05-06 15:31
I managed to get the slideshow plugin from Seditio (this one: http://www.neocrome.net/forums.php?m=posts&p=129349#129349) to work with cotonti 0.6.5 and lower), however it no longer does since like 2 weeks since I updated my test site to 0.6.7 (it stopped working right after 0.6.6).

When I do enable the plugin I recieve this error on the homepage:
Fatal error: Uncaught exception 'Exception' with message 'Template file not found: ' in /home/armaholi/public_html/testers/armaholictest/system/xtemplate.php:143 Stack trace: #0 /home/armaholi/public_html/testers/armaholictest/system/xtemplate.php(39): XTemplate->restart('') #1 /home/armaholi/public_html/testers/armaholictest/plugins/slideshow/slideshow.php(52): XTemplate->__construct('') #2 /home/armaholi/public_html/testers/armaholictest/plugins/slideshow/slideshow.php(143): sed_get_slideshow('tourneynews', '10', NULL) #3 /home/armaholi/public_html/testers/armaholictest/system/core/index/index.inc.php(44): include_once('/home/armaholi/...') #4 /home/armaholi/public_html/testers/armaholictest/index.php(20): require_once('/home/armaholi/...') #5 {main} thrown in /home/armaholi/public_html/testers/armaholictest/system/xtemplate.php on line 143


I have tried cleaning the cache but that did not help and to be honest........the above is total jibadiba for me, I have no idea where to look.
I guess something in the functions.php changed causing this, but no idea what to change in the plugin to make it work again.

When anyone reads this and knows whats causing this I would be very happy to hear it.
<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
Kort
#2 2010-05-06 16:51
I assume you have to options: free path (no chance) and commercial path (perfect quality).
SED.by - создание сайтов, разработка плагинов и тем для Котонти
GHengeveld
#3 2010-05-06 19:34
Seems to be a problem with the template file. Are you using any? If so, where is it located?

Possibly you have the template in your skin folder, named plug.standalone.tpl or something? Anyway, your plugin template files should be located in:
plugins/yourplug/
OR
plugins/yourplug/tpl
OR
skins/yourskin/plugins/ (recommended)

This means you should not have the template file for plugins in the root directory of your skin, but rather in a subdirectory named plugins.
foxhound
#4 2010-05-08 06:33
Thanks for the reply :)
The slideshow.tpl is already located under the skins/blaster07/plugins folder.

After you mentioned it I added it to the plugins folder too to see if that would help but no changes, still the same error appears.

I checked the slideshow.php file, and in it I found this:
        $mskin = sed_skinfile(array('slideshow', $cat));
        $slideshow = new XTemplate($mskin);

Probably thats having to do with the error seeing its refering to the xtemplate? I can also show the complete php if that would be better?




@kort,
I know I am not as advanced as the awesome skills you have with coding, in fact mine are equal to zero, but please do not assume I wont get anywhere using the limitted resources I have.
<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
This post was edited by foxhound (2010-05-08 06:43, 13 years ago)
GHengeveld
#5 2010-05-09 21:19
Try this:
$mskin = sed_skinfile(array('slideshow', $cat), true);
-or-
$mskin = sed_skinfile("slideshow.$cat", true);

2nd one may be slightly faster since it doesn't use an array, but I'm not sure it will work (because I dont know the value of $cat). The true condition is required for Cotonti to know it has to look in the plugins folder.
foxhound
#6 2010-05-09 23:26
# Koradhil : Try this:
$mskin = sed_skinfile(array('slideshow', $cat), true);
or
$mskin = sed_skinfile("slideshow.$cat", true);

Both give this sql error:
  Armaholic.com
2010-05-09 15:23
Fatal error : SQL error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'e' at line 5


2nd one may be slightly faster since it doesn't use an array, but I'm not sure it will work (because I dont know the value of $cat). The true condition is required for Cotonti to know it has to look in the plugins folder.

The "$cat" is the category (the "code" from the structure) you set in the plugin settings it should select the pages from.
<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
GHengeveld
#7 2010-05-10 01:16
I think my code was fine (either one), but there's more problems with this plugin. The SQL error probably didn't occur before because the code already terminated because of the template error and thus never got to the point where the SQL error occurs.

Seems to be a problem on line 5 (or before that), but what file...
Line 5 is actually a strange one, since normally you'd have a block of phpdoc at the top of each file.
Gökhan YILDIZ
#8 2010-05-10 02:09
# foxhound : I managed to get the slideshow plugin from Seditio (this one: http://www.neocrome.net/forums.php?m=posts&p=129349#129349) to work with cotonti 0.6.5 and lower), however it no longer does since like 2 weeks since I updated my test site to 0.6.7 (it stopped working right after 0.6.6).

When I do enable the plugin I recieve this error on the homepage:
Fatal error: Uncaught exception 'Exception' with message 'Template file not found: ' in /home/armaholi/public_html/testers/armaholictest/system/xtemplate.php:143 Stack trace: #0 /home/armaholi/public_html/testers/armaholictest/system/xtemplate.php(39): XTemplate->restart('') #1 /home/armaholi/public_html/testers/armaholictest/plugins/slideshow/slideshow.php(52): XTemplate->__construct('') #2 /home/armaholi/public_html/testers/armaholictest/plugins/slideshow/slideshow.php(143): sed_get_slideshow('tourneynews', '10', NULL) #3 /home/armaholi/public_html/testers/armaholictest/system/core/index/index.inc.php(44): include_once('/home/armaholi/...') #4 /home/armaholi/public_html/testers/armaholictest/index.php(20): require_once('/home/armaholi/...') #5 {main} thrown in /home/armaholi/public_html/testers/armaholictest/system/xtemplate.php on line 143


I have tried cleaning the cache but that did not help and to be honest........the above is total jibadiba for me, I have no idea where to look.
I guess something in the functions.php changed causing this, but no idea what to change in the plugin to make it work again.

When anyone reads this and knows whats causing this I would be very happy to hear it.

Hi. İt's my plugin.
New version: http://www.cotonti.com/datas/users/slidenewsplugin_109.rar
Old version: http://www.cotonti.com/datas/users/slideshownews_109.zip

Added 8 minutes later:

Gökhan YILDIZ
This post was edited by Gökhan YILDIZ (2010-05-10 02:18, 13 years ago)
ez
#9 2010-05-10 02:33
I am not quite sure what you mean by new version

Is it fixed and working for 0.67 now?.
==- I say: Keep it EZ -==
foxhound
#10 2010-05-10 03:01
Thats a different kind of slideshow plugin. There is a topic about that one here:
http://www.cotonti.com/forums.php?m=posts&p=21969&highlight=SLIDESHOW#21969

But that one does not work neither under 0.6.7, it generates the same sql error I posted above when installed.


# Koradhil : I think my code was fine (either one), but there's more problems with this plugin. The SQL error probably didn't occur before because the code already terminated because of the template error and thus never got to the point where the SQL error occurs.

Seems to be a problem on line 5 (or before that), but what file...
Line 5 is actually a strange one, since normally you'd have a block of phpdoc at the top of each file.

Yes, thats correct I think. No idea whats going on.
For anyone interested to take a look whats going on here is the plugin, it works only until 0.6.5. On higher Cotonti versions its causing the errors we are discussing here :)
File:
[hide]http://www.armaholic.com/datas/users/4-slideshow.7z[/hide]
<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
Dayver
#11 2010-05-10 11:46
foxhound you reinstaler this plugin in admin panel? What you write in config plugin? I mean parameter 'Category code of the parent category - separated by comma'. I think the reason this SQL errors in the not correct data in this parameter (maybe after reinstall the plug-in)
Pavlo Tkachenko aka Dayver
foxhound
#12 2010-05-10 15:53
I reinstalled this plugin a few dozen times by now trying to make it work ;)
The default category it adds to the "Category code of the parent category - separated by comma" is "news".
We have a news category in our page structure.

We are using the slideshow with a category called "tourneynews" though, but wether or not I change the plugin config to that makes no difference, there always is the sql error (after adding the change to the xtemplate "$mskin = sed_skinfile(array('slideshow', $cat), true);").
<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
This post was edited by foxhound (2010-05-11 04:52, 13 years ago)
ez
#13 2010-05-16 04:13
It is Fixed.... :) Some minor TPL issues....

emailed foxhound the plug...
==- I say: Keep it EZ -==
foxhound
#14 2010-05-17 23:41
Thanks for fixing the plugin ez, I really appreciate your help with this
I hope we can expand our cooperation (commercially, good work should be rewarded) in the future, I sent you an email about it ;)
<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />