Fieldgroup with custom HTML display values are not re-initialised properly?

More
7 years 7 months ago - 7 years 7 months ago #66896 by othbert
Hi guys,

I think I've found a bug with the fieldgroup implementation on Flexi 3.1.1

As I mentioned in a previous thread , I created an accordion style element using flexicontent fieldgroup to hold multiple groups of accordion items.

The items may contain a title -> text field, description -> textarea, image -> image, image-size -> radio button.
These are stored in a fieldgroup which is allowed to have multiple values. The fieldgroup is then added with a generic text title and description textarea type field as an accordion 'container'.

The issue I have is that if you have multiple accordion containers on a page, when they are created they appear to re-use a 'global' variable, which contains the previous accordion data and just overwrites the fields that have changed. This works ok for the title, description and radio selection, however it does not work at all for images. Whatever is set for an image will not be overwritten, whether it is empty or full, and whether you try to overwrite with no image, or a different image, it always shows the same image that was originally set for the first accordion on the page.

This happens when you have the display set to custom HTML and using the {{fieldname}} notation to create the output. If I switch it to default HTML then it works fine, but the display naturally is wrong compared to the custom setup I have.
I can see the relevant switching of display in joomla/plugins/flexicontent_fields/fieldgroup/fieldgroup.php starting around line 480 with the calls to getGroupFields and getGroupFieldsValues, but I wanted to check with you first to see if this is a known bug.

I'm not sure if that's an issue with how it is trying to overwrite an image in an image/gallery object as opposed to the others, but either way, should the object not just be created as a new type for display each time with a separate scope and data?

Thanks as always for the great software!
Last edit: 7 years 7 months ago by othbert.

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

More
7 years 7 months ago #66898 by micker
can you update to 3.2.0 beta on gihtub and redo your test ?

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
7 years 7 months ago #66920 by othbert
Hi there,

Updated to 3.2.x-stable branch and the issue still perisists.

Thanks.

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

More
7 years 7 months ago #66983 by ggppdk
Hello

test this:
edit field:
plugins/flexicontent_fields/fieldgroup/fieldgroup.php

find line:
Code:
if ( isset($grouped_field->{$method}) && is_array($grouped_field->{$method}) ) continue;
and comment it out by adding in front of it 2 slashes:
//


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
7 years 7 months ago #66984 by ggppdk
Hello


with not "re-initialized" do you mean "display value properties" of image field

like e.g.:
->"thumbs_src"

that contain the thumbnail url path ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
7 years 7 months ago #66986 by othbert
Hi there!

ggppdk wrote: Hello

test this:
edit field:
plugins/flexicontent_fields/fieldgroup/fieldgroup.php

find line:

Code:
if ( isset($grouped_field->{$method}) && is_array($grouped_field->{$method}) ) continue;
and comment it out by adding in front of it 2 slashes:
//


Commenting the line did not help unfortunately.

ggppdk wrote: Hello

with not "re-initialized" do you mean "display value properties" of image field

like e.g.:
->"thumbs_src"

that contain the thumbnail url path ?


That is indeed what I mean. if I var_dump the $grouped_fields array after calling:
$this->getGroupFieldsValues($field, $item, $grouped_fields, $max_count);
It shows that the public property 'value' has been correctly set to null for the non-existent image in the second accordion, but the display_original, thumbs_src etc paths are still populated from the first accordion.

Thanks, hope that helps?

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.496 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline