Support

  1. weppsol
  2. Bug Report
  3. Saturday, March 24 2018, 10:00 AM
Hi,

I am using Easy Profile 2.5.2 and I'm getting an error

Catchable fatal error: Object of class stdClass could not be converted to string in /administrator/components/com_jsn/models/fields/selectlist.php on line 68

I am using select type fields with a multisect option. I am getting this error after upgrading Easy Profile to latest and Joomla to latest 3.8.6 version.

Please suggest a solution.

Thanks
Attachments (1)
admin Accepted Answer
Admin
Hi,
can you please post me your site details to check this? if yes then you can use the form below the reply in "Site Details" tab
  1. more than a month ago
  2. Bug Report
  3. # 1
weppsol Accepted Answer
Hi,

I opened and saved 'select' type fields again and it works.
  1. more than a month ago
  2. Bug Report
  3. # 2
admin Accepted Answer
Admin
Great!
Unfortunately we cannot investigate about this because we are not able to replicate this problem and there are not any other customer with this problem. I hope this will not be repeated.
  1. more than a month ago
  2. Bug Report
  3. # 3
gudsoft Accepted Answer
I've exactly the same bug with the same version of joomla and easyprofile and with the select type fields with a multiselect option.
Thanks to try to solve
  1. more than a month ago
  2. Bug Report
  3. # 4
admin Accepted Answer
Admin
Hi Gu Delatt,
in file /administrator/components/com_jsn/models/fields/selectlist.php at line 55 replace this:
if(is_array($this->value)) $value=implode(',',$this->value);

with this
if(is_array($this->value) || is_object($this->value)) $value=implode(',',(array)$this->value);
  1. more than a month ago
  2. Bug Report
  3. # 5
gudsoft Accepted Answer
I'm sorry but after having apply this change i've the message :

Warning: mysqli_real_escape_string() expects parameter 2 to be string, object given in C:\laragon\www\indep-it\libraries\joomla\database\driver\mysqli.php on line 236

Recoverable fatal error: Object of class stdClass could not be converted to string in C:\laragon\www\indep-it\libraries\cms\html\select.php on line 731
  1. more than a month ago
  2. Bug Report
  3. # 6
admin Accepted Answer
Admin
Unfortunately we cannot investigate about this because we are not able to replicate this problem, can you please post me your site details to check your configuration? if yes then you can use the form below the reply in "Site Details" tab
  1. more than a month ago
  2. Bug Report
  3. # 7
gudsoft Accepted Answer
Content Protected
  1. more than a month ago
  2. Bug Report
  3. # 8
gudsoft Accepted Answer
Content Protected
  1. more than a month ago
  2. Bug Report
  3. # 9
admin Accepted Answer
Admin
Hi,
sorry for late reply, it was night for us.

Thanks for your availability, now we begin to check your site and investigate about this error.
  1. more than a month ago
  2. Bug Report
  3. # 10
admin Accepted Answer
Admin
Hi Gu Delatt,
we have found a fix.

please replace file /administrator/components/com_jsn/models/fields/selectlist.php with attached file (unzip first)

We will include this fix in next release.
Attachments (1)
  1. more than a month ago
  2. Bug Report
  3. # 11
gudsoft Accepted Answer
Everything is OK
Many thanks
  1. more than a month ago
  2. Bug Report
  3. # 12
gudsoft Accepted Answer
But ... can I suggest :

if(is_object($this->value)) $this->value = (array) $this->value;
elseif(is_array($this->value)) $value=implode(',',$this->value);
else $value=$this->value;
  1. more than a month ago
  2. Bug Report
  3. # 13
admin Accepted Answer
Admin
This will create some other problems:
Easy Profile Select field extends Joomla select, so the new line 55 convert value ($this->value) of the entire instance from object to array. After: if it is array then store in local function variable ($value) the value converted into string.

Why value is object? I don't know but I found that this seems to happen only with PHP 7.0 (instead 5.6, 7.1 and 7.2 works).
  1. more than a month ago
  2. Bug Report
  3. # 14
gudsoft Accepted Answer
OK, understood ! Sorry for the inconvenience.
  1. more than a month ago
  2. Bug Report
  3. # 15
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Request Support

Support is currently Online

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.