mod_flexicontent can't update layout

More
5 years 2 months ago - 5 years 2 months ago #75517 by iamrobert
When I try to update the layout for FLEXIcontent modules (FLEXIcontent 3.2.1.15) - it reverts to default value:



I have tried the standard layout - but the following console info appears:

core.js?ec3b5aabbee7f61873b7cd692f5f2904:1 window.writeDynaList() is deprecated without a replacement!


The second problem is when I update the FLEXIcontent version to 2.3.2 or 3.2.3 - I'm getting the following notice:

PHP Notice: Undefined property: stdClass::$parameters in components/com_flexicontent/classes/flexicontent.fields.php

and that breaks the site.

Its a pretty complex page:

+ taichungdesigner.com/merits/manual-wheelchairs

Any ideas?
Last edit: 5 years 2 months ago by iamrobert.

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

More
5 years 2 months ago - 5 years 2 months ago #75518 by iamrobert
On further inspection with the newer version - you must include the fields you want to reference for it to fire:



If I don't add this - the page will break - however - this worked fine in 3.2.15.

So - I believe this kind of code breaks without the call:

Code:
if ( !function_exists( 'pi_filter_label' ) ) { function pi_filter_label( $pi_field, $item ) { $fieldname = $pi_field; //'armrest'; if ( !isset( $item->fields[ $fieldname ]->parameters ) ) { FlexicontentFields::loadFieldConfig( $item->_row->fields[ $fieldname ], $item ); } $extra_props = array(); // use $extra_props = array('image'); // if radioimage or checkboximage field $elements = FlexicontentFields::indexedField_getElements( $item->_row->fields[ $fieldname ], $item, $extra_props ); if ( !empty( $elements ) ) foreach ( $elements as $el ) { if ( @unserialize( $el ) !== false || $el === 'b:0;' )$el = unserialize( $el ); //var_dump($el); echo '<div class="pretty p-default p-smooth"><input type="checkbox" value=".' . $pi_field . '_' . $el->value . '" id="' . $pi_field . '_' . $el->value . '" /><div class="state"><label for="' . $pi_field . '_' . $el->value . '">' . $el->text . '</label></div></div>'; } } }
Last edit: 5 years 2 months ago by iamrobert.

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

More
5 years 2 months ago #75519 by ggppdk
Hello

1.
you can not save the layout parameters
with v3.2.1.15 if you Regular Labs Advanced module Manager

because Advanced module Manager changed the Joomla event plugin name that is fired on save
(they were forced to change the event name because of changes in 3.9.0)

in v3.2.3 we are using both the old and new event name


2.

core.js?ec3b5aabbee7f61873b7cd692f5f2904:1 window.writeDynaList() is deprecated without a replacement!


It is just a warning message thrown by Joomla Core JS it is not an error

3. about warning of non set variable
can you provide the line that notice occurs ?


-- 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
5 years 2 months ago #75520 by iamrobert
Thanks - its the following:

PHP Notice: Undefined property: stdClass::$parameters in components/com_flexicontent/classes/flexicontent.fields.php on line 1976

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

More
5 years 2 months ago #75522 by iamrobert
On closer examination - its this part that doesn't function the same way without explicit values:
Code:
<?php if ( $rowcount % $item_columns_std == 0 ) { $oe_class = $oe_class == 'odd' ? 'even' : 'odd'; $rowtoggler = !$rowtoggler; } $rowcount++; $n++; //I WANT TO GET ALL THE VALUES - can't break out of v1; if ( !function_exists( 'pi_array_maker' ) ) { function pi_array_maker( $pi_field_id, $el_field_name, $item ) { $el_1_id = $pi_field_id; //245 //THIS NEEDS TO BE UNIQUE: // Use in ITEM view $el_1_vals = isset( $item->_row->fieldvalues[ $el_1_id ] ) ? $item->_row->fieldvalues[ $el_1_id ] : array(); $extra_props = array(); $elements = FlexicontentFields::indexedField_getElements( $item->_row->fields[ $el_field_name ], $item, $extra_props ); $pi_array = array(); if ( !empty( $el_1_vals ) ) foreach ( $el_1_vals as $v1 ) { if ( @unserialize( $v1 ) !== false || $v1 === 'b:0;' )$v1 = unserialize( $v1 ); //print_r($v1); //Individual group field value if ( is_array( $v1 ) ) { $pi_array[] = array_values( $v1 ); } else { $pi_array[] = array( 0 => $v1 ); } } $merge = array(); foreach ( $pi_array as $arr ) { $merge = array_merge( $merge, $arr ); } $merge = ( array_unique( $merge ) ); // $merge will show all the selected field values $pi_final_class = ""; foreach ( $merge as $pi_class ) { $pi_final_class .= ' ' . $el_field_name . '_' . $pi_class; } return $pi_final_class; } } //echo $filter1_id; if ( !function_exists( 'pi_class' ) ) { function pi_class( $item, $params ) { $final_class = " "; for ( $i = 1; $i <= 10; $i++ ) { $filter_name = $params->get( 'filter' . $i . '_name', '' ); $filter_id = $params->get( 'filter' . $i . '_id', '' ); if ( $filter_name != "" && $filter_id != "" ) { $final_class .= " " . pi_array_maker( $filter_id, $filter_name, $item ); } } return $final_class; } } ?> // <?php echo pi_class($item, $params);?>

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

More
5 years 2 months ago - 5 years 2 months ago #75526 by ggppdk
Hello

yes there was a change to it
field->parameters, because was considered not needed

Try to add parameters creation before:
Code:
$elements = FlexicontentFields::indexedField_getElements( $item->_row->fields[ $el_field_name ], $item, ...

add:
Code:
if (empty($item->_row->fields[ $el_field_name ]->parameters)) { FlexicontentFields::loadFieldConfig($item->_row->fields[ $el_field_name ], $item); } $elements = FlexicontentFields::indexedField_getElements( $item->_row->fields[ $el_field_name ], $item, ...


-- 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...
Last edit: 5 years 2 months ago by ggppdk.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.504 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