xoops forums

serial-weber

Just popping in
Posted on: 2010/8/8 7:22
serial-weber
serial-weber (Show more)
Just popping in
Posts: 53
Since: 2008/4/28
#1

module Extgallery 1.0.8 Error in xoops 2.4.5

Hi,

I have an error on the index page of extgallery module. But it works very good when I directly access to a cathegory or another page in the module. I already delete cache compile files and update the module, but nothing changes. During the 3 first day after it installation, every thing works good. Here is the error displayed:
This page cannot be displayed due to an internal error.

You can provide the following information to the administrators of this site to help them solve the problem:

Error: Smarty error: [in db:extgallery_index.html line 16]: syntax error: unclosed tag \{foreach} (opened line 10). (Smarty_Compiler.class.php, line 317)
Backtrace:
/class/smarty/Smarty.class.php (1093)
/class/smarty/Smarty.class.php (1815)
/class/smarty/Smarty_Compiler.class.php (2256)
/class/smarty/Smarty_Compiler.class.php (317)
/class/smarty/Smarty.class.php (1489)
/class/smarty/Smarty.class.php (1422)
/class/smarty/Smarty.class.php (1261)
/class/theme.php (429)
/footer.php (67)
/modules/extgallery/index.php (24)


My web site config is:
- Xoops 2.4.5
- Extgallery 1.0.8
- ...

Debug mode gives this:
Erreur(s)
Avertissement(s): Invalid argument supplied for foreach() dans le fichier /modules/xlanguage/include/functions.php - ligne 92
Message(s): Undefined variable: lang dans le fichier /modules/xlanguage/include/functions.php - ligne 106
Avertissement(s): Invalid argument supplied for foreach() dans le fichier /modules/xlanguage/include/functions.php - ligne 92
Message(s): Undefined variable: lang dans le fichier /modules/xlanguage/include/functions.php - ligne 106
Message(s): Undefined index: display dans le fichier /modules/xlanguage/include/functions.php - ligne 241
Message(s): Undefined index: languages dans le fichier /modules/xlanguage/include/functions.php - ligne 262
Avertissement(s): Invalid argument supplied for foreach() dans le fichier /modules/xlanguage/include/functions.php - ligne 262
Message(s): Use of undefined constant _MI_EXTGAL_B_SUB - assumed '_MI_EXTGAL_B_SUB' dans le fichier /modules/extgallery/xoops_version.php - ligne 481
Message(s): Use of undefined constant _MI_EXTGAL_B_SUB - assumed '_MI_EXTGAL_B_SUB' dans le fichier /modules/extgallery/xoops_version.php - ligne 481
Message(s): Use of undefined constant _MI_EXTGAL_B_SUB - assumed '_MI_EXTGAL_B_SUB' dans le fichier /modules/extgallery/xoops_version.php - ligne 481
Erreur(s): Smarty error: [in db:extgallery_index.html line 16]: syntax error: unclosed tag /{foreach} (opened line 10). (Smarty_Compiler.class.php, line 317) dans le fichier /class/smarty/Smarty.class.php - ligne 1093.

So what is the problem? Must I reinstall the module to resolve the problem??

Thank you

zyspec

Module Developer
Posted on: 2010/8/8 12:56
zyspec
zyspec (Show more)
Module Developer
Posts: 1077
Since: 2004/9/21
#2

Re: module Extgallery 1.0.8 Error in xoops 2.4.5

Sounds like this may be an issue in what the designer was expecting when using the foreachq smarty function.

You might try and change line 10 in ./extgallery/templates/extgallerty_index.html.

Change from:
<{foreachq item=child from=$cats}>

to:
<{foreach item=child from=$cats}>


The designer used the foreachq function to enhance performance. I'm not sure exactly what the exact issue is, since I don't have the module installed, but this may give you some insight into whether the data he's sending to the foreachq function is the source of the problem.

Don't forget to clear your template cache after making this change or you won't see the effect of the change.

ghia

Community Support Member
Posted on: 2010/8/8 23:03
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#3

Re: module Extgallery 1.0.8 Error in xoops 2.4.5

His question on XOOPS France has been answered.
The problem is an accented character that breaks Smarty in some cases depending on the website's character set.
The solution is to remove the accented character or to convert the template to the right character set with Notepad++ and then update the module.

serial-weber

Just popping in
Posted on: 2010/8/9 8:57
serial-weber
serial-weber (Show more)
Just popping in
Posts: 53
Since: 2008/4/28
#4

Re: module Extgallery 1.0.8 Error in xoops 2.4.5

Hi,

Ghia, I asked this question here because I didn't have answer in Xoops France. Everything you told me to do has been already done but the problem was not resolved. Even zyspec solutions was also applied but the problem remains.
Here is the web site: http://rbiodja.org
And here is the installed module: http://rbiodja.org/modules/extgallery/

To resolve the problem, I uninstalled the Extgallery Module and I just reinstalled it without changing anything else. So I don't know if the problem will appear again. I just want to know what I have to do now in order to avoid that the problem occurs again.

Thanks

Peekay

XOOPS is my life!
Posted on: 2010/8/9 10:05
Peekay
Peekay (Show more)
XOOPS is my life!
Posts: 2335
Since: 2004/11/20
#5

Re: module Extgallery 1.0.8 Error in xoops 2.4.5

It may be something else, but I recommend modifying ALL the comments in all the module templates first. I had a similar problem recently when updating a module containing comment written in French.

The 'Inforapid' software mentioned in this thread has a 'use subdirectories' option that will search and replace through the whole template folder.

-- Edit --

Sorry, just spotted Ghia recomended Notepad ++ will do the same.
A thread is for life. Not just for Christmas.

Arowana

Friend of XOOPS
Posted on: 2010/8/15 9:33
Arowana
Arowana (Show more)
Friend of XOOPS
Posts: 323
Since: 2004/8/6 2
#6

Re: module Extgallery 1.0.8 Error in xoops 2.4.5

1.0.7 works just fine and I am going to stick with it.
Arowana

serial-weber

Just popping in
Posted on: 2010/8/16 3:11
serial-weber
serial-weber (Show more)
Just popping in
Posts: 53
Since: 2008/4/28
#7

Re: module Extgallery 1.0.8 Error in xoops 2.4.5

Thank you,

Please, can you also give me a link for a stable version of Web photo module?? The one I downloaded didn't work well.

Thanks

Tazman_al

Just popping in
Posted on: 2010/8/16 11:18
Tazman_al
Tazman_al (Show more)
Just popping in
Posts: 66
Since: 2008/7/3 1
#8

Re: module Extgallery 1.0.8 Error in xoops 2.4.5

I had a similar error message about the foreach tag.
When i check the templates some of the code was missing!!!

As I use custom templates I was able to add the missing code.
I then in general settings changed the 'check templates for modifications' to "YES" to recompile the templates and then everything worked fine!
I then changed the 'check templates for modifications' back to "NO".

Al


redheadedrod

Home away from home
Posted on: 2010/8/16 14:50
redheadedrod
redheadedrod (Show more)
Home away from home
Posts: 1296
Since: 2008/2/26
#9

Re: module Extgallery 1.0.8 Error in xoops 2.4.5

Where did you find the missing code? Did you just simply pull it from 1.0.7?

Tazman_al

Just popping in
Posted on: 2010/8/21 19:59
Tazman_al
Tazman_al (Show more)
Just popping in
Posts: 66
Since: 2008/7/3 1
#10

Re: module Extgallery 1.0.8 Error in xoops 2.4.5

I had a working copy of the module on another site (previous version) and simply copied the template data over.

Al