Updating FOF to 2.4.1 (solves major issue in Control Panel) #5236
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Executive summary
This PR updates the FOF version included in Joomla! to FOF 2.4.1. This is required to fix a major bug in com_postinstall (Post Installation Messages) which results in the Joomla! Control Panel displaying a SQL error complaining about invalid SQL. This is a show stopper bug affecting a small but significant number of people (they've started asking me about it directly, that's how I found out).
Technical description
When updating some sites to Joomla! 3.3.6 you get a strange situation where the filter_order user state is set to an empty string and the FOF table cache is broken. This leads to PostinstallModelMessages to generate an invalid SQL query ending in ORDER BY `` ASC (note the empty column name). This happens because FOFModel lacks a safeguard against ordering by an empty column. Moreover, it is possible to set the filter_order_Dir user state to something other than ASC/DESC, also resulting in invalid SQL because there is no check on the validity of its value.
Test instructions
Before installing this PR go to Components, Post-Installation Messages. Edit the URL at the top of the page and append
&filter_order_Dir=foobar
. You get an immediate error message.Install this PR. Repeat the steps above. There is no SQL error and the component works correctly.
Also check that after installing the PR you can hide post-installation messages, show them again and that the Two Factor Authentication still works.
Backwards compatibility
This new version of FOF is fully backwards compatible with the one already shipped with Joomla!.
Translation impact
There are no translation strings added