No Code Attached Yet
avatar antonbag
antonbag
8 Sep 2022

Steps to reproduce the issue

  1. Create a Content Field of type List called "mylistfield" (for example) with values.
  2. Create an Article and in the Fields Tab, enter any value in "mylistfield".
  3. Call with the API to the created ID article {{base_url}}/{{base_path}}/content/articles/your article id with Postman

In php 7.4 it works perfect but in php >8 you get the error

Expected result

The article json data

Actual result

"TypeError: Illegal offset type in plugins/fields/list/list.php:47 ...

In php 7.4 it works perfect

System information (as much as possible)

Joomla 4.2.2
Php 8.0

Additional comments

In php 7.4 it works

avatar antonbag antonbag - open - 8 Sep 2022
avatar joomla-cms-bot joomla-cms-bot - change - 8 Sep 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Sep 2022
avatar alikon
alikon - comment - 8 Sep 2022

can you please test #38655

avatar antonbag
antonbag - comment - 8 Sep 2022

It works in Joomla 4.2.3-dev (php 8.1.9) but only with single option selected in the list field.

If the field has the multiple option activated it fails with Error 500.

Steps to reproduce the issue

  1. Create a Content Field of type List called "mylistfield" (for example) with values and activate the multiple option.
  2. Create an Article and in the Fields Tab, enter two values in "mylistfield".
  3. Call with the API to the created ID article {{base_url}}/{{base_path}}/content/articles/your article id with Postman

Expected result

The article json data

Actual result

    "code": 500,
    "title": "Internal server error"

System information (as much as possible)

Joomla 4.2.3-dev
Php 8.1.9

Additional comments

With php 7.4 it works

avatar alikon alikon - change - 19 Sep 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-09-19 07:44:57
Closed_By alikon
avatar alikon alikon - close - 19 Sep 2022
avatar alikon
alikon - comment - 19 Sep 2022

please test #38655

Add a Comment

Login with GitHub to post a comment