PHP Warning string instead of array inside Joomla content plugins, when fieldgroup is displayed using FlexicontentFields::getFieldDisplay()

More
8 years 7 months ago - 8 years 7 months ago #60778 by cmaciasg
Hi Flexis!

Joomla 3.4.8
FC: 3.0.13

I have a fieldgroup with 3 fields, 1 textarea and two texts fields. When I show the content in ForntEnd with
echo FlexicontentFields::getFieldDisplay($item, 'quote'); i get these warnings:

Warning: strpos() expects parameter 1 to be string, array given in E:\xampp\htdocs\joomla\plugins\content\loadmodule\loadmodule.php on line 45
Warning: preg_match_all() expects parameter 2 to be string, array given in E:\xampp\htdocs\joomla\plugins\content\loadmodule\loadmodule.php on line 60
Warning: preg_match_all() expects parameter 2 to be string, array given in E:\xampp\htdocs\joomla\plugins\content\loadmodule\loadmodule.php on line 87
Warning: mb_strpos() expects parameter 1 to be string, array given in E:\xampp\htdocs\joomla\libraries\vendor\joomla\string\src\phputf8\mbstring\core.php on line 41
Warning: mb_strpos() expects parameter 1 to be string, array given in E:\xampp\htdocs\joomla\libraries\vendor\joomla\string\src\phputf8\mbstring\core.php on line 41
Warning: mb_strpos() expects parameter 1 to be string, array given in E:\xampp\htdocs\joomla\libraries\vendor\joomla\string\src\phputf8\mbstring\core.php on line 41
Warning: strpos() expects parameter 1 to be string, array given in E:\xampp\htdocs\joomla\plugins\content\loadmodule\loadmodule.php on line 45
Warning: preg_match_all() expects parameter 2 to be string, array given in E:\xampp\htdocs\joomla\plugins\content\loadmodule\loadmodule.php on line 60
Warning: preg_match_all() expects parameter 2 to be string, array given in E:\xampp\htdocs\joomla\plugins\content\loadmodule\loadmodule.php on line 87
Warning: mb_strpos() expects parameter 1 to be string, array given in E:\xampp\htdocs\joomla\libraries\vendor\joomla\string\src\phputf8\mbstring\core.php on line 41
Warning: mb_strpos() expects parameter 1 to be string, array given in E:\xampp\htdocs\joomla\libraries\vendor\joomla\string\src\phputf8\mbstring\core.php on line 41
Warning: mb_strpos() expects parameter 1 to be string, array given in E:\xampp\htdocs\joomla\libraries\vendor\joomla\string\src\phputf8\mbstring\core.php on line 41


It's weird because they are Joomla Core Warnings.
How can i fix this??

Thanks.
Attachments:
Last edit: 8 years 7 months ago by ggppdk.

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

More
8 years 7 months ago - 8 years 7 months ago #60783 by ggppdk
Hello

but i have never tested displaying fieldgroup field using:
FlexicontentFields::getFieldDisplay()

will test,
- on your part check:
a. does it work if you add fieldgroup field in a "layout position" ?
b. is custom HTML parameter enabled in fieldgroup configuration ?


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

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

More
8 years 7 months ago - 8 years 7 months ago #60784 by cmaciasg
I have enabled custom HTML.
I'm going to check If it work if I add fieldgroup field in a "layout position"

Edit: If enabled default HTML instead of custom, I get the warnings too.
Edit 2: If I assign a position to the fieldgroup in the layout, but I keep showing the field with "FlexicontentFields::getFieldDisplay" the warnings dissapear.

It's weird because the warnings are shown, but the groupfield is displayed correctly.
Last edit: 8 years 7 months ago by ggppdk.

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

More
8 years 7 months ago - 8 years 7 months ago #60790 by ggppdk
Hello

the fields inside the FIELDGROUP field need to be created before the fieldgroup

- when using getFieldDisplay() something is not done properly

so this is a bug with custom display of FIELDGROUP field when using ... getFieldDisplay()
i have opened a new bug issue in our bug tracker:
github.com/FLEXIcontent/flexicontent-cck/issues/493


-- 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: 8 years 7 months ago by ggppdk.
The following user(s) said Thank You: cmaciasg

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

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