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

Correct Cache setWorkarounds to take account of multiple script or st… #36068

Merged
merged 2 commits into from
Jan 5, 2022

Conversation

GeraintEdwards
Copy link
Contributor

…yle declarations being used that mean that we have an array of scripts or stylesheets to be cached and not just a string

Cache setWorkarounds returns an array not a string

Pull Request for Issue # .

Summary of Changes

Correct Joomla\CMS\Cache Cache setWorkarounds to take account of multiple script or style declarations being used that mean that we have an array of scripts or stylesheets to be cached and not just a string
Joomla\CMS\Cache Cache setWorkarounds returns an array not a string

Testing Instructions

  1. On a Joomla 4-dev site install this module https://www.yoursites.net/testextensions/mod_cachetest.zip
  2. Create 2 instances of this module to display on the same page in different module positions - leave caching setting as 'global' in module settings
  3. Enable Joomla conservative caching in Joomla config
  4. Enable maximum error reporting in Joomla config#
  5. Make sure the Joomla cache is cleared
  6. Load the frontend page where modules are displayed
  7. Reload the frontend page

Actual result BEFORE applying this Pull Request

At Step 6 you get a php warning on arguments to mb_strlen and 4 javascript alert messages

See https://www.yoursites.net/testextensions/Screenshot%202021-11-17%20at%2010-05-05%20Home.png

At step 7 you get a different PHP warning from libraries/src/Document/HtmlDocument.php because it expects an array but has been given a script by Cache.php

Expected result AFTER applying this Pull Request

Page is displayed with no warning messages and module content is delivered from the cache correctly with 4 alerts

Documentation Changes Required

…yle declarations being used that mean that we have an array of scripts or stylesheets to be cached and not just a string

Cache setWorkarounds returns an array not a string
@tonypartridge
Copy link
Contributor

@brianteeman would you have a minute some time to test?

I'll do one tomorrow.

@brianteeman
Copy link
Contributor

brianteeman commented Nov 29, 2021

At Step 6 you get a php warning on arguments to mb_strlen and 4 javascript alert messages

I do not get the same results as you at this step. I just get an error page with this error
mb_strlen(): Argument #1 ($string) must be of type string, array given

image

Which means that step 7 can never occur

@GeraintEdwards
Copy link
Contributor Author

@brianteeman Its the same problem the cache code is applying strlen to an array.

I had error reporting enabled but not joomla debug mode when I was testing

@brianteeman
Copy link
Contributor

I enabled debug because you had it enabled in your screenshot ;)

With or without the debug I get the error page and not what you described

@GeraintEdwards
Copy link
Contributor Author

If you look at the screenshot of your debug trace notice that line 4 in the stack refers to line 694 of the file Cache.php - this is exactly where I am saying the error arises. If you are still seeing a reference to strlen error on line 694 of Cache.php then you I suspect you are seeing a cached version of the error output since line 694 no longer has a call to StringHelper::strlen in my version of the code.

If you apply the fix and clear the cache and repeat the test the error you are seeing should not appear.

@tonypartridge
Copy link
Contributor

I have tested this item ✅ successfully on 21715f3

Tested Successfully, pre-patch clearly shows the error

Warning
: mb_substr() expects parameter 1 to be string, array given in
/var/www/joomla4/libraries/vendor/joomla/string/src/phputf8/mbstring/core.php
on line

On applying patch without clearing cache we get:

Warning
: Invalid argument supplied for foreach() in
/var/www/joomla4/libraries/src/Document/HtmlDocument.php
on line
389

Clearing cache with path applied it loads without error.


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

@GeraintEdwards
Copy link
Contributor Author

Thanks @tonypartridge - forgot to emphasise that after applying the fix it is ESSENTIAL to clear the cache.

The error in HtmlDocument.php that you saw is a secondary manifestation of the same problem - Cache.php is storing the the cached data as a string but HtmlDocument.php is expecting it to be an array. My change resolves this issue (as you discovered)

@GeraintEdwards
Copy link
Contributor Author

@Fedik Would you mind taking a look at this issue and PR please - your PR ( in https://github.com/joomla/joomla-cms/commit/86a0d88e415112553ede15e989cfa1b81a32e15c) stored the scripts and styles as arrays but these changes should have been carried over to the Cache system too. This PR resolves these issues.

Thanks

@Fedik
Copy link
Member

Fedik commented Nov 30, 2021

From code review it looks good,
I try to test a bit later

@Fedik
Copy link
Member

Fedik commented Dec 4, 2021

I have tested this item ✅ successfully on 21715f3


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

@Fedik Fedik removed the PR-4.0-dev label Dec 4, 2021
@Fedik
Copy link
Member

Fedik commented Dec 4, 2021

r
t
c


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Dec 4, 2021
@pritam825
Copy link
Contributor

I have tested this item ✅ successfully on 21715f3


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

1 similar comment
@khu5h1
Copy link
Contributor

khu5h1 commented Dec 5, 2021

I have tested this item ✅ successfully on 21715f3


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

@wilsonge wilsonge merged commit 7f9238b into joomla:4.0-dev Jan 5, 2022
@wilsonge
Copy link
Contributor

wilsonge commented Jan 5, 2022

Thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jan 5, 2022
bembelimen added a commit that referenced this pull request Jan 5, 2022
* [4.0] Backup message (#36487)

Many users who use their hosts backup facility and this is typically __only__ for files

This update reminds them to backup the database as well

* [4.0]  xml code style (#36532)

Fixes a few spaces to tabs issues

* [4.0] media manager breadcrumbs (#36154)

* [4.0] media manager breadcrumbs

The RTL specific css was wrong as can be seen in the before screenshot

This PR removes the RTL specific css (should have been scss) and updates the scss to use logical properties instead.

This PR also removes an unused class `breadcrumb-item`.

To test RTL you will need to install arabic or persian.

and dont forget to npm ci

There is no visible change in LTR and the RTL changes are as shown below

## Before LTR

## Before RTL

## After LTR

## After RTL

* revert

* [4.0] RTL: Correcting Admin login 2factor and feedback hints (#36024)

This is a replacement to the merged PR #32104

It does exactly the same thing but by using css logical properties we avoid the need to maintain both an LTR and an RTL version[4.0]

There is no visual change

* [4.0] Category list (#36536)

Remove extra div that is not needed

* [4.0] Make routing work in console applications (#36332)

* Update list-fancy-select.php (#36543)

replace tab with space

code review

* [4.0] archive icon (#36263)

All the state icons are grey so that the published icon, which is green, stands out visually.

The archived icon however was black. This PR changes that icon to grey.

### Before

### After

* [4.0] Banner Client tips (#36262)

* [4.0] Banner Client tips

Adds a tooltip to the banner client numbers so that they appear the same as category numbers. Also corrects the class on the trashed number so that it has the correct colour

To test
Create one banner client
Create a banner for the client in each of the published states

* Update administrator/components/com_banners/tmpl/clients/default.php

oops

Co-authored-by: Quy <[email protected]>

Co-authored-by: Quy <[email protected]>

* Fix article creation from frontend (#36542)

* [4.0] Handle when toggle icon is not available (#36329)

* Handle when toggle icon is not available

* cs

* Take workflow extension into account when setting a default (#36527)

* Fix uploadlimits checks (#36023)

* Make edit_lock layout reusable for other extensions (#35112)

* Allow to set a value for SubformField (#35921)

* [4.0] Fix example in cleanImageURL docblock (#36554)

* Fix Codemirror behind tabs (#36140)

* Fix Codemirror behind tabs

* jscs

* Remove dependency on Factory in AdminController

* [4.0] Ensure path contains api in the router (#36315)

* [4.0] Check model is set before calling its methods (#36378)

* Check model is set before calling its methods

* Update OverridesController.php

* Category edit form should use return url (#36560)

Currently the article edit form respects return URLs; the category edit form does not. Adding it here makes for a more consistent editing experience.

* [4.0] Sample Data plugin images (#36237)

Updates the plugin to use the new image data used in lazy loading etc. This avoids confusion for users who see different source code for their created articles when compared to the same data plugins

To test. Just make sure the sample data still installs and works as expected

* [4.0] If the Mail Template was not found in the db, return false (#36489)

* [4.0] Code Style (#36564)

* Use an absolute path in image list field (#36063)

* Correct Cache setWorkarounds to take account of multiple script or style declarations being used that mean that we have an array of scripts or stylesheets to be cached and not just a string (#36068)

Cache setWorkarounds returns an array not a string

Co-authored-by: Brian Teeman <[email protected]>
Co-authored-by: Allon Moritz <[email protected]>
Co-authored-by: Quy <[email protected]>
Co-authored-by: Nicola Galgano <[email protected]>
Co-authored-by: Roland Dalmulder <[email protected]>
Co-authored-by: Harald Leithner <[email protected]>
Co-authored-by: Tuan Pham Ngoc <[email protected]>
Co-authored-by: Fedir Zinchuk <[email protected]>
Co-authored-by: wilsonge <[email protected]>
Co-authored-by: Phil E. Taylor <[email protected]>
Co-authored-by: Crystal Dionysopoulos <[email protected]>
Co-authored-by: heelc29 <[email protected]>
Co-authored-by: Geraint Edwards <[email protected]>
bembelimen added a commit that referenced this pull request Jan 15, 2022
* [4.0] Backup message (#36487)

Many users who use their hosts backup facility and this is typically __only__ for files

This update reminds them to backup the database as well

* Remove reference & in usort callback function (#36503)

* Update paragonie sodium_compat to 1.17.0 (#36491)

Co-authored-by: Benjamin Trenkle <[email protected]>

* [3.10] Finder plugins modify component params registry / Backport #35855 (#36141)

* Backport #35855 to 3.10

* one space to much

* [4.0]  xml code style (#36532)

Fixes a few spaces to tabs issues

* [4.0] media manager breadcrumbs (#36154)

* [4.0] media manager breadcrumbs

The RTL specific css was wrong as can be seen in the before screenshot

This PR removes the RTL specific css (should have been scss) and updates the scss to use logical properties instead.

This PR also removes an unused class `breadcrumb-item`.

To test RTL you will need to install arabic or persian.

and dont forget to npm ci

There is no visible change in LTR and the RTL changes are as shown below

## Before LTR

## Before RTL

## After LTR

## After RTL

* revert

* [4.0] RTL: Correcting Admin login 2factor and feedback hints (#36024)

This is a replacement to the merged PR #32104

It does exactly the same thing but by using css logical properties we avoid the need to maintain both an LTR and an RTL version[4.0]

There is no visual change

* [4.0] Category list (#36536)

Remove extra div that is not needed

* [4.0] Make routing work in console applications (#36332)

* Update list-fancy-select.php (#36543)

replace tab with space

code review

* [4.0] archive icon (#36263)

All the state icons are grey so that the published icon, which is green, stands out visually.

The archived icon however was black. This PR changes that icon to grey.

### Before

### After

* [4.0] Banner Client tips (#36262)

* [4.0] Banner Client tips

Adds a tooltip to the banner client numbers so that they appear the same as category numbers. Also corrects the class on the trashed number so that it has the correct colour

To test
Create one banner client
Create a banner for the client in each of the published states

* Update administrator/components/com_banners/tmpl/clients/default.php

oops

Co-authored-by: Quy <[email protected]>

Co-authored-by: Quy <[email protected]>

* Fix article creation from frontend (#36542)

* [4.0] Handle when toggle icon is not available (#36329)

* Handle when toggle icon is not available

* cs

* Take workflow extension into account when setting a default (#36527)

* Fix uploadlimits checks (#36023)

* Make edit_lock layout reusable for other extensions (#35112)

* Allow to set a value for SubformField (#35921)

* [4.0] Fix example in cleanImageURL docblock (#36554)

* Fix Codemirror behind tabs (#36140)

* Fix Codemirror behind tabs

* jscs

* Remove dependency on Factory in AdminController

* [4.0] Ensure path contains api in the router (#36315)

* [4.0] Check model is set before calling its methods (#36378)

* Check model is set before calling its methods

* Update OverridesController.php

* Category edit form should use return url (#36560)

Currently the article edit form respects return URLs; the category edit form does not. Adding it here makes for a more consistent editing experience.

* [4.0] Sample Data plugin images (#36237)

Updates the plugin to use the new image data used in lazy loading etc. This avoids confusion for users who see different source code for their created articles when compared to the same data plugins

To test. Just make sure the sample data still installs and works as expected

* [4.0] If the Mail Template was not found in the db, return false (#36489)

* [4.0] Code Style (#36564)

* Use an absolute path in image list field (#36063)

* Correct Cache setWorkarounds to take account of multiple script or style declarations being used that mean that we have an array of scripts or stylesheets to be cached and not just a string (#36068)

Cache setWorkarounds returns an array not a string

* [3] privacy request by logged in user only (#35470)

* privacy request logged in only

* privacy request logged in only

* privacy request logged in only

* privacy request logged in only

* privacy request logged in only

* Update components/com_privacy/controller.php

Co-authored-by: Quy <[email protected]>

Co-authored-by: Quy <[email protected]>

* Feature - Add always count option to 404 redirects (#34640)

* Feature - Add always count option to 404 redirects

* Add missiing space for code sniffer

* Return line for if statement

* Update plugins/system/redirect/redirect.php

Co-authored-by: Quy <[email protected]>

* Alpha Ordering - Change Constant too.

* update constant

* Update en-GB.plg_system_redirect.ini

* remove trailing whtiespace

* Remove Added Language Strings

* Update plugins/system/redirect/redirect.php

Co-authored-by: Phil E. Taylor <[email protected]>

* Update redirect.xml

* Update redirect.php

* Update plugins/system/redirect/redirect.php

Co-authored-by: Quy <[email protected]>

* Update plugins/system/redirect/redirect.php

Co-authored-by: Benjamin Trenkle <[email protected]>

* Update plugins/system/redirect/redirect.php

Co-authored-by: Quy <[email protected]>
Co-authored-by: Phil E. Taylor <[email protected]>
Co-authored-by: Tobias Zulauf <[email protected]>
Co-authored-by: Benjamin Trenkle <[email protected]>

* php8 deprecation str_replace Passing null to param (#36400)

* add php 8.1 to the version array (#36577)

* Add function parameters for callbacks. Fixes #36010

* PHP 8.1 deprecation fixes (#36306)

* Backport some deprecation fixes from the J4 branch

* Ensure htmlspecialchars is passed a string

* Ignore PHPCS errors

Co-authored-by: Tobias Zulauf <[email protected]>

* Update simplepie to 1.3.3 (#36358)

* Update simplepie to 1.3.2 & phar-stream-wrapper to 2.2.2

* update to simplepie 1.3.3 to fix the version

* [3.10] Dont show the pre upgrade checker when the upgrade is not supported (#36312)

* [3.10] Fix Progressive caching to cache modules per custom menu assignment (#36324)

* Fix progressive caching

* Update libraries/src/Document/HtmlDocument.php

Co-authored-by: Phil E. Taylor <[email protected]>

* cast int

* Update libraries/src/Document/HtmlDocument.php

* Update libraries/src/Document/HtmlDocument.php

* Update libraries/src/Document/HtmlDocument.php

* Update libraries/src/Document/HtmlDocument.php

* Update libraries/src/Document/HtmlDocument.php

* Update libraries/src/Document/HtmlDocument.php

Co-authored-by: Phil E. Taylor <[email protected]>
Co-authored-by: Tobias Zulauf <[email protected]>

* Bump registry to 1.6.4 (#36611)

* [4.0] Load the subform data correctly (#36598)

* Load the subform data correctly

* correct order

* don't remove <joomla-hidden-mail> (#36602)

* [4.0] Function to unregister a provider in media manager (#36594)

* [4.0] Latests/Popular Admin modules permissions (#36559)

* Allow our phpcode sniffer composer plugin to run

* PHP 8.1 fixes ported from #36355

* Fix codestyle. Thanks @brianteeman

* Improve security and type checking of the installer task

* Ensure the rule modifier is a string by default

* Ensure cpanel dashboard name is type safe (PHP 8.1)

* Fix mistake in param ordering

* Fix PHP 8.1 notice when creating an article

* Fix URL Field giving deprecated notices in PHP 8.1

* [4.0] Fix template preview (#36268)

* Fix template preview

* Fix template preview

* Fix Progressive caching to cache modules per custom menu assignment (#36193)

* Cross Origin for Google Fonts (#36592)

* Update Tobscure library to be PHP 8.1 compat

* Tag 4.0.6 RC1

* Reset to dev

* Translation Update (#36356)

* [4.0] Fix images (#35780)

* [4.0] Joomla Update Silent fails (#36492)

* [4.0] Joomla Update Silent fails

I am not 100% certain that this is the best approach to this. @nikosdion @wilsonge please advise

## The Problem
As reported in # if during an update a sql query fails then the updater quits the sql part of the update process and moves on. The joomla_update log gives no indication that there has been a problem etc.

## Proposed Partial Solution
Adds a Start SQL and End SQL to the logs
If there is an error in the sql then that is written to the logs as well AND it now says End SQL incomplete

### Testing
For the testing we will be using the "Update your site by manually uploading the update package." and to make things quick I have prepared an empty update that you should download and use.

### Before Test 1
Update your install and then check the `administrator\logs\joomla_update.php`
It should look like

### Before Test 2
Update your database to change the value in the #__schemas table so that the version_id is 4.0.0-2018-5-15
Update your install and then check the `administrator\logs\joomla_update.php`
It should look like

### Before Test 3
Update your database to change the value in the #__schemas table so that the version_id is 4.0.3
Update your install and then check the `administrator\logs\joomla_update.php`
It should look like

### After - Test 1
Update your database to change the value in the #__schemas table so that the version_id is 4.0.4

Update your install and then check the `administrator\logs\joomla_update.php`
It should look like

### After -  Test 2
Update your database to change the value in the #__schemas table so that the version_id is 4.0.0-2018-5-15
Update your install and then check the `administrator\logs\joomla_update.php`
It should look like

### Before Test 3
Update your database to change the value in the #__schemas table so that the version_id is 4.0.3
Update your install and then check the `administrator\logs\joomla_update.php`
It should look like

* Fix null being passed to DateTime::__construct causing PHP 8.1 deprecation error

* Missing param default to fix uploads in PHP 8.1

* Tag 4.0.6 RC2

* Reset to dev

* Missing param default to fix renaming media in PHP 8.1

* Stub generator now handles deprecated namespaced classes (#35144)

* Fix error in article model (#36617)

* Fix code comment

* Temporary remove phpnext tests (#36624)

* Sign drone.yml

* Translation Update (#36645)

* Update extract.php (#36635)

* Update composer.lock

Co-authored-by: Brian Teeman <[email protected]>
Co-authored-by: Harald Leithner <[email protected]>
Co-authored-by: Tobias Zulauf <[email protected]>
Co-authored-by: Allon Moritz <[email protected]>
Co-authored-by: Quy <[email protected]>
Co-authored-by: Nicola Galgano <[email protected]>
Co-authored-by: Roland Dalmulder <[email protected]>
Co-authored-by: Tuan Pham Ngoc <[email protected]>
Co-authored-by: Fedir Zinchuk <[email protected]>
Co-authored-by: wilsonge <[email protected]>
Co-authored-by: Phil E. Taylor <[email protected]>
Co-authored-by: Crystal Dionysopoulos <[email protected]>
Co-authored-by: heelc29 <[email protected]>
Co-authored-by: Geraint Edwards <[email protected]>
Co-authored-by: Tony Partridge <[email protected]>
Co-authored-by: frostmakk <[email protected]>
Co-authored-by: Dimitris Grammatikogiannis <[email protected]>
Co-authored-by: joomla-translation-bot <[email protected]>
Co-authored-by: Richard Fath <[email protected]>
Co-authored-by: Sveinung Larsen <[email protected]>
bembelimen added a commit that referenced this pull request Jan 15, 2022
* [4.0] Backup message (#36487)

Many users who use their hosts backup facility and this is typically __only__ for files

This update reminds them to backup the database as well

* Remove reference & in usort callback function (#36503)

* Update paragonie sodium_compat to 1.17.0 (#36491)

Co-authored-by: Benjamin Trenkle <[email protected]>

* [3.10] Finder plugins modify component params registry / Backport #35855 (#36141)

* Backport #35855 to 3.10

* one space to much

* [4.0]  xml code style (#36532)

Fixes a few spaces to tabs issues

* [4.0] media manager breadcrumbs (#36154)

* [4.0] media manager breadcrumbs

The RTL specific css was wrong as can be seen in the before screenshot

This PR removes the RTL specific css (should have been scss) and updates the scss to use logical properties instead.

This PR also removes an unused class `breadcrumb-item`.

To test RTL you will need to install arabic or persian.

and dont forget to npm ci

There is no visible change in LTR and the RTL changes are as shown below

## Before LTR

## Before RTL

## After LTR

## After RTL

* revert

* [4.0] RTL: Correcting Admin login 2factor and feedback hints (#36024)

This is a replacement to the merged PR #32104

It does exactly the same thing but by using css logical properties we avoid the need to maintain both an LTR and an RTL version[4.0]

There is no visual change

* [4.0] Category list (#36536)

Remove extra div that is not needed

* [4.0] Make routing work in console applications (#36332)

* Update list-fancy-select.php (#36543)

replace tab with space

code review

* [4.0] archive icon (#36263)

All the state icons are grey so that the published icon, which is green, stands out visually.

The archived icon however was black. This PR changes that icon to grey.

### Before

### After

* [4.0] Banner Client tips (#36262)

* [4.0] Banner Client tips

Adds a tooltip to the banner client numbers so that they appear the same as category numbers. Also corrects the class on the trashed number so that it has the correct colour

To test
Create one banner client
Create a banner for the client in each of the published states

* Update administrator/components/com_banners/tmpl/clients/default.php

oops

Co-authored-by: Quy <[email protected]>

Co-authored-by: Quy <[email protected]>

* Fix article creation from frontend (#36542)

* [4.0] Handle when toggle icon is not available (#36329)

* Handle when toggle icon is not available

* cs

* Take workflow extension into account when setting a default (#36527)

* Fix uploadlimits checks (#36023)

* Make edit_lock layout reusable for other extensions (#35112)

* Allow to set a value for SubformField (#35921)

* [4.0] Fix example in cleanImageURL docblock (#36554)

* Fix Codemirror behind tabs (#36140)

* Fix Codemirror behind tabs

* jscs

* Remove dependency on Factory in AdminController

* [4.0] Ensure path contains api in the router (#36315)

* [4.0] Check model is set before calling its methods (#36378)

* Check model is set before calling its methods

* Update OverridesController.php

* Category edit form should use return url (#36560)

Currently the article edit form respects return URLs; the category edit form does not. Adding it here makes for a more consistent editing experience.

* [4.0] Sample Data plugin images (#36237)

Updates the plugin to use the new image data used in lazy loading etc. This avoids confusion for users who see different source code for their created articles when compared to the same data plugins

To test. Just make sure the sample data still installs and works as expected

* [4.0] If the Mail Template was not found in the db, return false (#36489)

* [4.0] Code Style (#36564)

* Use an absolute path in image list field (#36063)

* Correct Cache setWorkarounds to take account of multiple script or style declarations being used that mean that we have an array of scripts or stylesheets to be cached and not just a string (#36068)

Cache setWorkarounds returns an array not a string

* [3] privacy request by logged in user only (#35470)

* privacy request logged in only

* privacy request logged in only

* privacy request logged in only

* privacy request logged in only

* privacy request logged in only

* Update components/com_privacy/controller.php

Co-authored-by: Quy <[email protected]>

Co-authored-by: Quy <[email protected]>

* Feature - Add always count option to 404 redirects (#34640)

* Feature - Add always count option to 404 redirects

* Add missiing space for code sniffer

* Return line for if statement

* Update plugins/system/redirect/redirect.php

Co-authored-by: Quy <[email protected]>

* Alpha Ordering - Change Constant too.

* update constant

* Update en-GB.plg_system_redirect.ini

* remove trailing whtiespace

* Remove Added Language Strings

* Update plugins/system/redirect/redirect.php

Co-authored-by: Phil E. Taylor <[email protected]>

* Update redirect.xml

* Update redirect.php

* Update plugins/system/redirect/redirect.php

Co-authored-by: Quy <[email protected]>

* Update plugins/system/redirect/redirect.php

Co-authored-by: Benjamin Trenkle <[email protected]>

* Update plugins/system/redirect/redirect.php

Co-authored-by: Quy <[email protected]>
Co-authored-by: Phil E. Taylor <[email protected]>
Co-authored-by: Tobias Zulauf <[email protected]>
Co-authored-by: Benjamin Trenkle <[email protected]>

* php8 deprecation str_replace Passing null to param (#36400)

* add php 8.1 to the version array (#36577)

* Add function parameters for callbacks. Fixes #36010

* PHP 8.1 deprecation fixes (#36306)

* Backport some deprecation fixes from the J4 branch

* Ensure htmlspecialchars is passed a string

* Ignore PHPCS errors

Co-authored-by: Tobias Zulauf <[email protected]>

* Update simplepie to 1.3.3 (#36358)

* Update simplepie to 1.3.2 & phar-stream-wrapper to 2.2.2

* update to simplepie 1.3.3 to fix the version

* [3.10] Dont show the pre upgrade checker when the upgrade is not supported (#36312)

* [3.10] Fix Progressive caching to cache modules per custom menu assignment (#36324)

* Fix progressive caching

* Update libraries/src/Document/HtmlDocument.php

Co-authored-by: Phil E. Taylor <[email protected]>

* cast int

* Update libraries/src/Document/HtmlDocument.php

* Update libraries/src/Document/HtmlDocument.php

* Update libraries/src/Document/HtmlDocument.php

* Update libraries/src/Document/HtmlDocument.php

* Update libraries/src/Document/HtmlDocument.php

* Update libraries/src/Document/HtmlDocument.php

Co-authored-by: Phil E. Taylor <[email protected]>
Co-authored-by: Tobias Zulauf <[email protected]>

* Bump registry to 1.6.4 (#36611)

* [4.0] Load the subform data correctly (#36598)

* Load the subform data correctly

* correct order

* don't remove <joomla-hidden-mail> (#36602)

* [4.0] Function to unregister a provider in media manager (#36594)

* Joomla! 3.10.5 Release Candidate 1

* [4.0] Latests/Popular Admin modules permissions (#36559)

* Allow our phpcode sniffer composer plugin to run

* PHP 8.1 fixes ported from #36355

* Fix codestyle. Thanks @brianteeman

* Improve security and type checking of the installer task

* Ensure the rule modifier is a string by default

* Ensure cpanel dashboard name is type safe (PHP 8.1)

* Fix mistake in param ordering

* Fix PHP 8.1 notice when creating an article

* Fix URL Field giving deprecated notices in PHP 8.1

* [4.0] Fix template preview (#36268)

* Fix template preview

* Fix template preview

* Fix Progressive caching to cache modules per custom menu assignment (#36193)

* Cross Origin for Google Fonts (#36592)

* Update Tobscure library to be PHP 8.1 compat

* Tag 4.0.6 RC1

* Reset to dev

* reset to dev

* Translation Update (#36356)

* [4.0] Fix images (#35780)

* [4.0] Joomla Update Silent fails (#36492)

* [4.0] Joomla Update Silent fails

I am not 100% certain that this is the best approach to this. @nikosdion @wilsonge please advise

## The Problem
As reported in # if during an update a sql query fails then the updater quits the sql part of the update process and moves on. The joomla_update log gives no indication that there has been a problem etc.

## Proposed Partial Solution
Adds a Start SQL and End SQL to the logs
If there is an error in the sql then that is written to the logs as well AND it now says End SQL incomplete

### Testing
For the testing we will be using the "Update your site by manually uploading the update package." and to make things quick I have prepared an empty update that you should download and use.

### Before Test 1
Update your install and then check the `administrator\logs\joomla_update.php`
It should look like

### Before Test 2
Update your database to change the value in the #__schemas table so that the version_id is 4.0.0-2018-5-15
Update your install and then check the `administrator\logs\joomla_update.php`
It should look like

### Before Test 3
Update your database to change the value in the #__schemas table so that the version_id is 4.0.3
Update your install and then check the `administrator\logs\joomla_update.php`
It should look like

### After - Test 1
Update your database to change the value in the #__schemas table so that the version_id is 4.0.4

Update your install and then check the `administrator\logs\joomla_update.php`
It should look like

### After -  Test 2
Update your database to change the value in the #__schemas table so that the version_id is 4.0.0-2018-5-15
Update your install and then check the `administrator\logs\joomla_update.php`
It should look like

### Before Test 3
Update your database to change the value in the #__schemas table so that the version_id is 4.0.3
Update your install and then check the `administrator\logs\joomla_update.php`
It should look like

* Fix null being passed to DateTime::__construct causing PHP 8.1 deprecation error

* Missing param default to fix uploads in PHP 8.1

* Tag 4.0.6 RC2

* Reset to dev

* Missing param default to fix renaming media in PHP 8.1

* Stub generator now handles deprecated namespaced classes (#35144)

* Fix error in article model (#36617)

* Fix code comment

* Temporary remove phpnext tests (#36624)

* Sign drone.yml

* Use the correct namespace for the taggable trait (#36640)

* Translation Update (#36645)

* Update extract.php (#36635)

* Updated MediaHelper::canUpload function

* Tag RC3

* Reset to dev

Co-authored-by: Brian Teeman <[email protected]>
Co-authored-by: Harald Leithner <[email protected]>
Co-authored-by: Tobias Zulauf <[email protected]>
Co-authored-by: Allon Moritz <[email protected]>
Co-authored-by: Quy <[email protected]>
Co-authored-by: Nicola Galgano <[email protected]>
Co-authored-by: Roland Dalmulder <[email protected]>
Co-authored-by: Tuan Pham Ngoc <[email protected]>
Co-authored-by: Fedir Zinchuk <[email protected]>
Co-authored-by: wilsonge <[email protected]>
Co-authored-by: Phil E. Taylor <[email protected]>
Co-authored-by: Crystal Dionysopoulos <[email protected]>
Co-authored-by: heelc29 <[email protected]>
Co-authored-by: Geraint Edwards <[email protected]>
Co-authored-by: Tony Partridge <[email protected]>
Co-authored-by: frostmakk <[email protected]>
Co-authored-by: Dimitris Grammatikogiannis <[email protected]>
Co-authored-by: joomla-translation-bot <[email protected]>
Co-authored-by: Richard Fath <[email protected]>
Co-authored-by: Sveinung Larsen <[email protected]>
Co-authored-by: Akshit Rattan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants