major BUG with gknews module

Advanced newspaper or magazine Joomla template to build news website with unique and detailed design.
GK User
Wed Sep 22, 2010 3:59 pm
hi,

i'm having problems with the gknews module on my site. i have 6-7 instances of this module on my site, all of them working as expected, except for 2 instances which show the following error:

Warning: Invalid argument supplied for foreach() in /home/pharmapo/public_html/modules/mod_gk_news/tmpl/default.php on line 19

Warning: Invalid argument supplied for foreach() in /home/pharmapo/public_html/modules/mod_gk_news/tmpl/default.php on line 31


what do these errors refer to?

i have these two instances configured exactly as the ones that are working. if i change the section from which the articles are drawn, then the errors disappear.

i'm not sure where lies the problem???
User avatar
Fresh Boarder

GK User
Wed Sep 22, 2010 5:10 pm
UPDATE!

the only specific thing i managed to notice is that the gknews modules that cause problems, draw their content from sections that have double digit IDs.

if a choose a section with a single digit ID, the same GKNews module no longer throws an error.

on the other hand, every new section that I create has double digit ID, so that means that i will not be able to use GKNews with newly created sections.

Please look into this problem, this is a pretty serious BUG! I firmly believe that this double digit ID situation is the cause of the problem.
User avatar
Fresh Boarder

GK User
Thu Sep 23, 2010 12:57 pm
Hello Gavick Team!!!

have you had the chance to verify this bug?
User avatar
Fresh Boarder

teitbite
Fri Sep 24, 2010 11:47 am
Hi

Please befort the lines which generates this errors add a condition chaecking if the param for foreach is an array.

Like this:

Code: Select all
if( is_array( $name_of_the_param_here ) ) $name_of_the_param_here = array();
User avatar
Moderator

GK User
Sat Sep 25, 2010 12:50 am
I have the same problem how can i solve this?
User avatar
Fresh Boarder

GK User
Sat Sep 25, 2010 9:34 am
teitbite wrote:
Hi

Please befort the lines which generates this errors add a condition chaecking if the param for foreach is an array.

Like this:

Code: Select all
if( is_array( $name_of_the_param_here ) ) $name_of_the_param_here = array();


well this does not work! it only throws in more code lines.

besides as i can see in the code the params are already explicitly defined as arrays!

this forum support is terribly slow and inefficient. this is not the way a paid support is supposed to work. i'm highly disappointed!!!
User avatar
Fresh Boarder

teitbite
Sat Sep 25, 2010 4:13 pm
Hi

Please send me ftp access details. I got to make something wrong.
User avatar
Moderator

teitbite
Sun Sep 26, 2010 1:02 pm
Hi

I have done it :)

This problem occures when there is only one section choosen for the module. The solution is to use the attached file instead.
User avatar
Moderator

GK User
Sun Sep 26, 2010 1:18 pm
I made all section id's with single digit and module works fine after that when i enabled 2 or more gk_news module it gives that error

Code: Select all
Fatal error: Cannot redeclare toggle() (previously declared in /home/dpudorg/public_html/modules/mod_gk_news/tmpl/default.php:38) in /home/dpudorg/public_html/modules/mod_gk_news/tmpl/default.php on line 42
User avatar
Fresh Boarder

teitbite
Tue Sep 28, 2010 2:41 pm
Hi

Please send me ftp access and the joomla panel access to Your site.
User avatar
Moderator

GK User
Tue Sep 28, 2010 3:02 pm
i can confirm that the changes teitbite did to GKNews on my site are working.

i would be monitoring the module in the forthcoming period in case unexpected errors appear.
User avatar
Fresh Boarder

GK User
Sun Oct 03, 2010 7:24 am
Did any one get the solution for the problem that is occuring in double digit id
i am getting mad as i dont understand how to deal with it
User avatar
Fresh Boarder

teitbite
Sun Oct 03, 2010 8:46 pm
Hi

I've already posted a couple of posts above the file to replace for in the module which fix the problem.
User avatar
Moderator

GK User
Tue Oct 19, 2010 3:00 pm
Thank you for posting the dbhelper file, it fixes errors when only showing one section.

But I still get the "Fatal error: Cannot redeclare toggle()" error described above when using the gknews module more than once on a page.

Each module are given a unique ID on the module page.

Any help? Or is the above solution a secret... :-)
User avatar
Fresh Boarder

teitbite
Thu Oct 21, 2010 10:46 am
Hi

I think that You can setup GK News to use more than one section at a time, so You not need to use more than one module per site. I think that this is what Dziudek suggested here: http://www.gavick.com/forum/36-news-sho ... html#65787
User avatar
Moderator

GK User
Fri Nov 12, 2010 11:15 pm
thanx for the file. it fixed my prob. :-)
User avatar
Fresh Boarder


cron