Hi,
I have a Joomla 1.5 site with K2. I am migrating it to a Joomla 3.1.5 site using K2 2.6.7. Currently I am using the default Protostar template and the default K2 template.
Everything was working properly until I installed chronoforms 4.0.2 on the site and enabled the chronoforms content plugin V4 RC3.5.3.
When I enable the chronoforms content plugin on the K2 category page only the first item is displayed and the subsequent items only show the Featured flag. On the item details page I get the following error message:
Warning: Invalid argument supplied for foreach() in /home/username/public_html/vanclistings/components/com_k2/views/item/view.html.php on line 457. The chronoform displays fine in the detailed listing.
I can then go disable the chronoforms plugin and the warning message disappears and all of the items in the category display properly again.
So, there seems to be some interaction between the chronoforms plugin and K2.
See the category page: http://www.upgrade.mikestewart.ca/vanclistings/
See the item details page: http://www.upgrade.mikestewart.ca/vanclistings/item/125-602-1888-york-avenue-kitsilano-condo-vancouver-west
This is the same site but with the chronoforms plugin turned off: http://upgrade.mikestewart.ca/listings/
Any ideas on what could be causing the issue or how to fix it?
Thank you.
I have a Joomla 1.5 site with K2. I am migrating it to a Joomla 3.1.5 site using K2 2.6.7. Currently I am using the default Protostar template and the default K2 template.
Everything was working properly until I installed chronoforms 4.0.2 on the site and enabled the chronoforms content plugin V4 RC3.5.3.
When I enable the chronoforms content plugin on the K2 category page only the first item is displayed and the subsequent items only show the Featured flag. On the item details page I get the following error message:
Warning: Invalid argument supplied for foreach() in /home/username/public_html/vanclistings/components/com_k2/views/item/view.html.php on line 457. The chronoform displays fine in the detailed listing.
I can then go disable the chronoforms plugin and the warning message disappears and all of the items in the category display properly again.
So, there seems to be some interaction between the chronoforms plugin and K2.
See the category page: http://www.upgrade.mikestewart.ca/vanclistings/
See the item details page: http://www.upgrade.mikestewart.ca/vanclistings/item/125-602-1888-york-avenue-kitsilano-condo-vancouver-west
This is the same site but with the chronoforms plugin turned off: http://upgrade.mikestewart.ca/listings/
Any ideas on what could be causing the issue or how to fix it?
Thank you.
Hi ljk,
I think this is probably the JParameter bug :-(
In Joomla! 3 JParameter has been deprecated in favour of JRegister. Rather than recode for the current versions Max has added a edited version of the old JParameter Class in the plug-in. The CF Plug-in does check to see if the class is already defined. But the problem is that if the CF version is loaded and then a later loading extension either doesn't check; or requires a method that Max has pruned then you can get an error.
What is the code on line 457? Does that fit with a JParameter problem?
Bob
I think this is probably the JParameter bug :-(
In Joomla! 3 JParameter has been deprecated in favour of JRegister. Rather than recode for the current versions Max has added a edited version of the old JParameter Class in the plug-in. The CF Plug-in does check to see if the class is already defined. But the problem is that if the CF version is loaded and then a later loading extension either doesn't check; or requires a method that Max has pruned then you can get an error.
What is the code on line 457? Does that fit with a JParameter problem?
Bob
Hi,
Yes, it looks like that is probably the problem. Here are lines 455 to 457:
This error shows on the item details page, but the form seems to display and work on this page.
On the category page there is no error message showing but the second and subsequent items do not display other than their featured flag. It seems that the $item gets corrupted. It uses JParameter as well, so that is probably the issue there too.
So, is there a way to fix this so I can use Chronoforms with K2 on a Joomla 3.x site?
Thank you.
Yes, it looks like that is probably the problem. Here are lines 455 to 457:
$mdata = class_exists('JParameter') ? new JParameter($item->metadata) : new JRegistry($item->metadata);
$mdata = $mdata->toArray();
foreach ($mdata as $k => $v)
This error shows on the item details page, but the form seems to display and work on this page.
On the category page there is no error message showing but the second and subsequent items do not display other than their featured flag. It seems that the $item gets corrupted. It uses JParameter as well, so that is probably the issue there too.
So, is there a way to fix this so I can use Chronoforms with K2 on a Joomla 3.x site?
Thank you.
Hi ljk,
I'm not sure, the *right* answer is for Max to fix the bug - I know that he is aware of it.
I guess that one solution would be to rename the class in the plug-in code to say JParameterCF - but that's non-trivial. I just did a quick search on my test site and found 180 references (all I think in the ChronoForms code).
Otherwise it might be possible to add additional methods to the ChronoForms class but again looking at the code it doesn't look much like the 2.5 version of JParameter.
All in all, I think that the best answers is to chase Max for a fix through the Contact Us link above. He may possibly have an beta release package with the fix already in it?
Bob
I'm not sure, the *right* answer is for Max to fix the bug - I know that he is aware of it.
I guess that one solution would be to rename the class in the plug-in code to say JParameterCF - but that's non-trivial. I just did a quick search on my test site and found 180 references (all I think in the ChronoForms code).
Otherwise it might be possible to add additional methods to the ChronoForms class but again looking at the code it doesn't look much like the 2.5 version of JParameter.
All in all, I think that the best answers is to chase Max for a fix through the Contact Us link above. He may possibly have an beta release package with the fix already in it?
Bob
This topic is locked and no more replies can be posted.