Forums

wrong form loaded using plugin

emmexx 17 Feb, 2015
I have a rather strange problem with the cf plugin.

I created a form and put the form name inside the html description of a tag (I'm talking about the tags component):
{chronoforms}form1{/chronoforms}
html text...

For many week everything seemed to work fine. I was using SEF and joomla cache.
About 10 days ago I found out that the form was missing from the page where the tag description is displayed.

I checked the code inside the page (using firebug) and I found out code from a different form 😲
I disabled the joomla cache, deleted the cache but nothing changed.
I tried to use a different form instead of form1 and it is displayed properly!
I created a copy of form1, form2, changed the name of the form inside the tag description but I keep getting the code of the wrong form.

What is happening here?

Thank you
maxx
GreyHead 18 Feb, 2015
Hi Maxx,

Sorry, I've not seen this problem before.

Do you have caching on? Do you have any other content plug-in that might be changing the page code somehow?

Bob
emmexx 18 Feb, 2015


Sorry, I've not seen this problem before.

Do you have caching on? Do you have any other content plug-in that might be changing the page code somehow?


Hi Bob,
caching was on but now I disabled it.
Probably there are other content plugins, I'm using a yootheme template, so lots of stuff loads, widgetkit, uikit and who knows what... 🙂

The weird thing is that any change I make to the other form, the one that gets wrongly loaded, is reflected in the page.
I tried using a chronoforms module, I created a new menu item, I created a new form and copied actions and code but the other form loads instead of the one I want.
This is ridiculous.

On the same site I use the chronoforms plugin to load similar forms (leaflet maps) and I have no problem.

I suspect the problem is in the tags component. Some of the views are missing the code to load plugins so there could be a bug somewhere else in the code. The tags component was introduced in joomla 3 so its code is relatively new.

bye
maxx
GreyHead 18 Feb, 2015
Hi Maxx,

Please check that you don't have two forms with the same name - or with spaces in the name? That might explain this behavior.

Bob
emmexx 18 Feb, 2015


Please check that you don't have two forms with the same name - or with spaces in the name? That might explain this behavior.


The form had - in the name but I already tried removing them to no avail.
And everything worked even with the dashes in the form name up to 2 weeks ago. And I have other forms with dashes in the name that work. Anyway I'll change the name, I forgot about the bad characters.
I don't have forms with the same name.

Thank you
maxx
emmexx 18 Feb, 2015
I made some experiment to narrow the error conditions.

I created a new menu item and a chronoform module to be displayed on that menu.
If the menu type is one of the tag component, the module is not displayed if the related "form" is a leaflet map one. If the form is a "normal" form it is displayed.

If the menu type is one of the article component, the module is displayed as it should be for any related form.

I'd like to know why it did work for many weeks and it stopped working without updating or installing anything.

I have the feeling that there's some link between the menu items of type tag.

bye
maxx
emmexx 18 Feb, 2015


If the menu type is one of the tag component, the module is not displayed if the related "form" is a leaflet map one. If the form is a "normal" form it is displayed.


I specify a little bit.
The types of tag menu link that don't work are: Tagged elements and Compact list of tagged elements. I'm not sure about List of all tags.

If I use one of those menu items the wrong code is loaded. I wrote code because I checked the code with firebug and the code to load the map is there even if I selected a form without a map.

To sum up:
In the page loaded using a menu item of type tags even if there's no chronoforms plugin or module, I find some code from one of my forms. I can see the link to javascript and css files, the inline css code and javascript code that are part of of the Load css and Load js actions of the wrong form.

bye
maxx
emmexx 18 Feb, 2015


In the page loaded using a menu item of type tags even if there's no chronoforms plugin or menu,


I meant chronoforms plugin or module.

maxx
GreyHead 19 Feb, 2015
Hi Maxx,

Sorry - this sounds to me like a Joomla! bug :-(

Bob
emmexx 19 Feb, 2015
If I disable the chronoforms plugin everything seems to work as expected.

I'm not an expert of joomla code but there must be some kind of bug in the way the com_tags component manages the content plugins. Or in the way the chronoforms plugin answers to events.
The code that loads plugins is in
components/com_tags/views/tag/vie.html.php
.

bye
maxx
emmexx 19 Feb, 2015
I did another test to ascertain why the single category view of com_content works but the Compact list of tagged elements doesn't.
The articles are the same but in one case they are listed because they belong to a category, in the other because they belong to a tag.

In the body of the articles there's the tag for the cf plugin.
I suppose that the category list view trigger the plugin only on the relevant part of the content, the tag vie passes to the plugin everything triggering the form display, even if only the article title is displayed.

I'll ask info on the joomla forum.

bye
maxx
This topic is locked and no more replies can be posted.