Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.1] Reset the cached layout data during FormField setup() #43562

Merged
merged 3 commits into from
Jul 3, 2024

Conversation

sousa9g
Copy link

@sousa9g sousa9g commented May 29, 2024

Summary of Changes

Joomla 5.1 added a new method to cache the form field layout data (collectLayoutData()). While it is great for performance, it is now impossible to reset the cached layout data.

In the FormField setup(). The input and labels are cleared:

$this->input = null;
$this->label = null;

However with the introductions of memory caching layout data, those lines don't work anymore, as the input is always rendered using the cached layout data.

Testing Instructions

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

Joomla 5.1 added a new method to cache the form field layout data, while it is great for performance, it is impossible to reset the cached layout data.
@Fedik
Copy link
Member

Fedik commented May 29, 2024

I have tested this item ✅ successfully on fd1f6c5

On review. It doing the same as $this->input = null; $this->label = null;


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43562.

@Fedik Fedik changed the title Reset the cached layout data during FormField setup() [5.1] Reset the cached layout data during FormField setup() May 29, 2024
@viocassel
Copy link
Contributor

I have tested this item ✅ successfully on fd1f6c5


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43562.

@Quy
Copy link
Contributor

Quy commented May 29, 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43562.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label May 29, 2024
@LadySolveig LadySolveig added this to the Joomla! 5.1.2 milestone Jul 3, 2024
@LadySolveig LadySolveig merged commit 344e3f7 into joomla:5.1-dev Jul 3, 2024
0 of 2 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jul 3, 2024
@LadySolveig
Copy link
Contributor

Thank you @sousa9g 🚀 and also for review and testing @Fedik and @viocassel 💚

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants