[SOLVED] update item with custom field

More
7 years 5 months ago #64954 by fopo-web
Hi, I thing I have found a bug in the flexicontent api.

I set some custom values like this and save the item.

$item = $value;

After saving, my other custom fields (which I have not modified) will be cleared. It will not be maintain with the exisiting value.

What can I do?

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

More
7 years 5 months ago #64957 by ggppdk
Hello

yes, we need to update the FAQ article about how to load the existing values into the data array,
before calling the save operation on DB model

i ll update it today or tommorow


-- 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 5 months ago #64969 by fopo-web
Hi, do you have updated the FAQ?


regards,

Frank

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

More
7 years 5 months ago #64972 by ggppdk
Hello

try this it should work:
1. call
Code:
$data['custom'] = FlexicontentFields::_getCustomValues(array($item), 'item');

2. then change the values of $data

and post back here


-- 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 5 months ago #64987 by fopo-web
Hi, thanks for your help, but it doesn't work.

The function returns the wrong structure:
Code:
"custom": { "359": { "15": [ "value of 15" ], "20": [ "value of 20" ], "21": [ "value of 21" ], ....

regards,

Frank

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

More
7 years 5 months ago #64999 by ggppdk
Hello

indeed, it will need some restructuring, and also it will need:
PHP unserialize on the values too

need to look at this and update the FAQ article


-- 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.

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