Buy Now
Sign in

error when loading 2 events in the same page

emmexx , July 14 2020, 08:33
emmexx 450
July 14 2020, 08:33 #393370
Sometimes I try to put in the same page(s) 2 different events of the same CCV6 connection using the plugin code.
Sometimes it works without errors, sometimes it doesn't.
The error is something like:
Fatal error:  Cannot redeclare my_function() (previously declared
: eval()'d code:12) in /mysite/libraries/cegcore2/admin/extensions/chronofc/helpers/parser.php(100) : eval()'d code on line 75
my_function is a php function defined in a function or view used by one of the events but not by the other.
Do events load something else other than "their" code (the code defined in their Events Content field)? Why?
thank you
emmexx 450
July 16 2020, 13:58 #393385
Some other info on the problem:
I created another connection. In the page I put the ccv6 plugin tag for 2 connections, something like:
This way I get no error.
Now in 2ndConn otherEvent I add {debug:}.
The output of the page is:
[option] => com_chronoconnectivity6
[view] => connection
[conn] => 1stConn
[event] => otherEvent
[otherEvent] =>
conn should be 2ndConn!
And there's that otherEvent parameter that is odd.
Is mixing of connections in the same page ok or should it be avoided?