Kunena 6.3.0 released

The Kunena team has announce the arrival of Kunena 6.3.0 [K 6.3.0] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x. This version addresses most of the issues that were discovered in K 6.2 and issues discovered during the last development stages of K 6.3

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question [SOLVED] mod_kunenalatest 1.6.0-RC1 error if used in more than one instance

More
13 years 8 months ago - 13 years 8 months ago #1 by mervyn
Hi,

I experienced, that if you use mod_kunenalatest more than once on one page, i get the following error:
Fatal error: Cannot redeclare class modKunenaLatest in .../modules/mod_kunenalatest/mod_kunenalatest.php on line 25
Last edit: 13 years 8 months ago by mervyn.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #2 by Cerberus
well tbh yer that would be the case you asking the same module to do two different jobs at the same time.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago - 13 years 8 months ago #3 by mervyn
Yup - and that is exactly what I want to do. It should:
1) show the latest topics of different selected forums in one module position
2) show latest topics of one selected forum in another position

I can use most of my modules in more than one instance on the same page to do different things. It should be managable to get this one to do the same.
Last edit: 13 years 8 months ago by mervyn.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #4 by xillibit
Hello,

With the Joomla! Module mananger, you can od a copy of the module and after you will haven't anymore this issue. Just select with the checkbox the actual kunena latest module and hit the button copy, then you will see a new module nammed copy of kunena latest, it's all and it's magic :) :

I don't provide support by PM, because this can be useful for someone else.
Attachments:

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago - 13 years 8 months ago #5 by mervyn
That is basically what I did and what caused the problem. I used "New module" to add another instance of the module and it produces the above mentioned error.
Code:
Fatal error: Cannot redeclare class modKunenaLatest in .../modules/mod_kunenalatest/mod_kunenalatest.php on line 25
Last edit: 13 years 8 months ago by mervyn.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago - 13 years 8 months ago #6 by xillibit
You must not use new module function, but copy function like i have explained below

I don't provide support by PM, because this can be useful for someone else.
Last edit: 13 years 8 months ago by xillibit.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago - 13 years 8 months ago #7 by mervyn
I did that, of course, too. It leads, like expected, to the exact same result (why should a copy work otherwise than a "new" module, both are instances of the same code with a new id).
[strike]So maybe there is a possibility to fix the code? Pretty please?[/strike]

Edit: So I fixed it myself. For those who experience the same problems:

Cut "class modKunenaLatest" and put it in a seperate file. Require_once the file and all works out just fine.
Last edit: 13 years 8 months ago by mervyn. Reason: Found solution

Please Log in or Create an account to join the conversation.

Time to create page: 0.558 seconds