? ? Pending

User tests: Successful: Unsuccessful:

avatar korenevskiy
korenevskiy
3 Apr 2022

When opening a user's page with an article and any custom field. This same field is rendered 2 times. I repeat. One field in the article is rendered 2 times. This issue has been studied. When the field is rendered 2 times, only 1 result is shown on the site, and 2 render result is meaningless. At the same time, All subscriptions of render events called by the dispatcher are also executed 2 times. Thus, it is not possible to write a user data handler without using crutches and props to avoid double processing of the field object.
For example, if you develop a new field with processing data from forms received from the user. Then such data processing needs to be subscribed to the plugin method

PlgFieldsNewForm->onCustomFieldsPrepareField($context, $item, $field)

But this method will be called 2 times.
My correction allows you to make 1 render for one field call. While maintaining backward compatibility.

This correction does not matter for static data output. But this amendment is of great importance for the output of dynamic data in user fields of articles. This can be useful when creating a complex graph field with a lot of data in one field. Or a feedback field. But in order for feedback to work in a complex field, it is required to render exactly as many times as it will be displayed on the site.

aa0ac93 23 Dec 2021 avatar brianteeman lang
3afbf44 24 Dec 2021 avatar brianteeman minus
82dc916 24 Dec 2021 avatar brianteeman cs
dcefa79 4 Jan 2022 avatar dgrammatiko meh
a5f8f3c 4 Jan 2022 avatar dgrammatiko oops
1236207 6 Jan 2022 avatar brianteeman lint
c09474c 6 Jan 2022 avatar brianteeman lint
avatar korenevskiy korenevskiy - open - 3 Apr 2022
avatar korenevskiy korenevskiy - change - 3 Apr 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Apr 2022
Category Unit Tests Repository Administration com_admin SQL Postgresql
avatar korenevskiy korenevskiy - change - 3 Apr 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-04-03 20:25:25
Closed_By korenevskiy
Labels Added: ? ?
avatar korenevskiy korenevskiy - close - 3 Apr 2022

Add a Comment

Login with GitHub to post a comment