Front End Editing in Flexicontent with Joomlart Uber T3 template

More
6 years 8 months ago - 6 years 8 months ago #68969 by ggppdk
Hello

their code assumes that when $data is an object then it is a \JObject

(possibly) correct code for them to use is :
Code:
if (empty($data)) { $fdata = $input->post->get('jform', array(), 'array'); } // Ensure the input data is an array. elseif (is_object($data)) { if ($data instanceof Registry) { // Handle a Registry. $fdata = $data->toArray(); } elseif ($data instanceof \JObject) { // Handle a JObject. $fdata = $data->getProperties(); } else { // Handle other types of objects. $fdata = (array) $data; } }


Note the part
Code:
if (is_object($data)) { ... }
is from Joomla core

please pass the above information


-- 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: 6 years 8 months ago by ggppdk.

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

More
6 years 8 months ago #68970 by thatch10
George,

I have passed this back to the Joomlart team, thanks very much for your assistance.

Thatch

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

More
6 years 8 months ago #68971 by thatch10
I have added the code to the file on my server and this appears to have resolved the issue and I can now edit through to flexicontent.

I have passed your recommended change back to the Joomlart developers through their forum.

Thanks again

Thatch

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

More
6 years 8 months ago #68972 by ggppdk
Hello

if you want to use the code sample that i provided then you will need to use:

$fdata =
instead of
$data =

i have edit my previous message and updated my code sample to use correct variable name

so now it should be appropriate for you to use,

please use the updated code


-- 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
6 years 8 months ago #68973 by ggppdk
Hello

also the $data that is passed to event onContentPrepareForm:

is normally
-- either an array
-- or an stdClass object

so flexicontent is indeed passing data with correct type
-- for reference see :
Code:
public function onContentPrepareForm(JForm $form, $data)

plugins\system\fields\fields.php
plugins\system\languagecode\languagecode.php
plugins\user\profile\profile.php

Please pass the above information too
and also please see my previouse message


-- 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...
The following user(s) said Thank You: thatch10

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

More
6 years 8 months ago - 6 years 8 months ago #68974 by thatch10
George

all threads passed back onto the Joomlart Template Thread.

Fantastic response as always.

Thatch
Last edit: 6 years 8 months ago by ggppdk.

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

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