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

[4.0] Make routing work in console applications #36332

Merged
merged 5 commits into from
Jan 2, 2022

Conversation

laoneo
Copy link
Member

@laoneo laoneo commented Dec 17, 2021

Summary of Changes

When working on the console, then routing in Joomla doesn't work propperly. Especially the widely used Route::_() code is crashing. This pr adds a function to the console class to get the router object and fills the HTTP_HOST server variable with the live site parameter.

Testing Instructions

  • Enable SEF in the Joomla configuration
  • Create an article
  • Create a blog menu item with the category of the article selected
  • Add the following code to the file /libraries/src/Console/ListUserCommand.php somewhere in the doExecute function:
    $this->ioStyle->success(\JRoute::_('index.php?option=com_content&view=article&id=1&catid=8'));
    Replace the ids 1 and 8 with the ones from your joomla site.
  • In the terminal run php cli/joomla.php user:list

Actual result BEFORE applying this Pull Request

Error in the terminal Call to undefined method Joomla\CMS\Application\ConsoleApplication::getRouter()

Expected result AFTER applying this Pull Request

You see a green OK text with the SEF route to the article.

@alikon
Copy link
Contributor

alikon commented Dec 17, 2021

should fix #34840 i guess... i'll test later

@laoneo
Copy link
Member Author

laoneo commented Dec 17, 2021

@alikon yes it should fix it

@alikon
Copy link
Contributor

alikon commented Dec 17, 2021

I have tested this item ✅ successfully on ef15ffe


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

1 similar comment
@astridx
Copy link
Contributor

astridx commented Dec 17, 2021

I have tested this item ✅ successfully on ef15ffe


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

@alikon
Copy link
Contributor

alikon commented Dec 17, 2021

RTC


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

@joomla-cms-bot joomla-cms-bot added RTC This Pull Request is Ready To Commit and removed PR-4.0-dev labels Dec 17, 2021
@Quy Quy added PR-4.0-dev RTC This Pull Request is Ready To Commit and removed RTC This Pull Request is Ready To Commit labels Dec 17, 2021
@wilsonge
Copy link
Contributor

Sorry this isn't correct (in my opinion) - I accept some of this is somewhat more subjective than other PR's though. There's kinda two parts here so I'm going to address each separately

First of all the getRouter method. Happy to add that to the application so we can use \Joomla\CMS\Router\Route::link. However in terms of the default router even though there is no site router - I think it's wrong to load the site router explicitly as the default. I'd rather it errors out by default if it's called with the wrong data rather than be wrongly relied on.

In terms of the setting of the HTTP_HOST I'm very sure that overloading server side variables is wrong - plus we still end up with potentially bad behaviour here when live_site isn't set (I'm still yet to set that on any of my sites) - and we just end up with that being null and still getting junk URLs out on each of those instances. This needs a proper fix (I'm not 100% sure how) where I guess the application has the ability to inject the base domain into the Uri::getInstance method which would override the HTTP_HOST. Possibly by taking advantage of the WebApplication's https://github.com/joomla-framework/application/blob/2.0-dev/src/AbstractWebApplication.php#L1001-L1004 variables and doing some sort of similar config in the console application so we have consistency over both applications. Open to ideas on the best way forward there - but the idea being we need consistency over both web and console and to treat them as equals rather than bodging around the console.

@wilsonge wilsonge removed the RTC This Pull Request is Ready To Commit label Dec 29, 2021
@laoneo
Copy link
Member Author

laoneo commented Dec 30, 2021

First of all the getRouter method. Happy to add that to the application so we can use \Joomla\CMS\Router\Route::link. However in terms of the default router even though there is no site router - I think it's wrong to load the site router explicitly as the default. I'd rather it errors out by default if it's called with the wrong data rather than be wrongly relied on.

I changed the code, so when no name is set that that an exception is thrown. But I left the code in place when a cli router is requested that it uses the site router as this is the case when Route::_() is called.

I'm very sure that overloading server side variables is wrong

There is no other way to get the web site url than from the live site in console applications. But I removed it and now every extension dev has to set it in the console command by itself. Anyway, for me it is important to have routing work in console applications.

@wilsonge
Copy link
Contributor

I changed the code, so when no name is set that that an exception is thrown. But I left the code in place when a cli router is requested that it uses the site router as this is the case when Route::_() is called.

But the entire point of Route::_ has always been it's been application specific. That's why we introduced Router::link to start with in 3.7 so we could do cross-application routing.

@laoneo
Copy link
Member Author

laoneo commented Jan 2, 2022

Ok, removed the fallback. All I did was to remove some new code since RTC, So @wilsonge can you consider it now ready to merge?

@wilsonge wilsonge merged commit e978e60 into joomla:4.0-dev Jan 2, 2022
@wilsonge
Copy link
Contributor

wilsonge commented Jan 2, 2022

Thanks!

I think for 4.1 (as technically it's a low impact b/c break) we might also want to consider putting getRouter into the \Joomla\CMS\Application\CMSApplicationInterface so typehints work nicer - but this is definitely all we can do for the 4.0-dev branch.

@wilsonge wilsonge deleted the j4/console/router branch January 2, 2022 23:48
@wilsonge wilsonge added this to the Joomla 4.0.6 milestone Jan 2, 2022
@laoneo
Copy link
Member Author

laoneo commented Jan 3, 2022

Definitely, the whole getRouter stuff needs some love. @bembelimen can you ping me when 4.0-dev is merged into 4.1? So I will do a followup pr.

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 <quy@fluxbb.org>

Co-authored-by: Quy <quy@fluxbb.org>

* 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 <brian@teeman.net>
Co-authored-by: Allon Moritz <allon.moritz@digital-peak.com>
Co-authored-by: Quy <quy@fluxbb.org>
Co-authored-by: Nicola Galgano <optimus4joomla@gmail.com>
Co-authored-by: Roland Dalmulder <contact@rolandd.com>
Co-authored-by: Harald Leithner <leithner@itronic.at>
Co-authored-by: Tuan Pham Ngoc <github@joomdonation.com>
Co-authored-by: Fedir Zinchuk <getthesite@gmail.com>
Co-authored-by: wilsonge <georgejameswilson@googlemail.com>
Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
Co-authored-by: Crystal Dionysopoulos <9141288+crystalenka@users.noreply.github.com>
Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>
Co-authored-by: Geraint Edwards <github@copyn.plus.com>
@laoneo
Copy link
Member Author

laoneo commented Jan 10, 2022

@wilsonge made a 4.1 pr for the interface changes in #36631. But #36630 should be merged first.

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 <bembelimen@users.noreply.github.com>

* [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 <quy@fluxbb.org>

Co-authored-by: Quy <quy@fluxbb.org>

* 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 <quy@fluxbb.org>

Co-authored-by: Quy <quy@fluxbb.org>

* 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 <quy@fluxbb.org>

* 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 <phil@phil-taylor.com>

* Update redirect.xml

* Update redirect.php

* Update plugins/system/redirect/redirect.php

Co-authored-by: Quy <quy@fluxbb.org>

* Update plugins/system/redirect/redirect.php

Co-authored-by: Benjamin Trenkle <bembelimen@users.noreply.github.com>

* Update plugins/system/redirect/redirect.php

Co-authored-by: Quy <quy@fluxbb.org>
Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
Co-authored-by: Tobias Zulauf <zero-24@users.noreply.github.com>
Co-authored-by: Benjamin Trenkle <bembelimen@users.noreply.github.com>

* 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 <zero-24@users.noreply.github.com>

* 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 <phil@phil-taylor.com>

* 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 <phil@phil-taylor.com>
Co-authored-by: Tobias Zulauf <zero-24@users.noreply.github.com>

* 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 <brian@teeman.net>
Co-authored-by: Harald Leithner <leithner@itronic.at>
Co-authored-by: Tobias Zulauf <zero-24@users.noreply.github.com>
Co-authored-by: Allon Moritz <allon.moritz@digital-peak.com>
Co-authored-by: Quy <quy@fluxbb.org>
Co-authored-by: Nicola Galgano <optimus4joomla@gmail.com>
Co-authored-by: Roland Dalmulder <contact@rolandd.com>
Co-authored-by: Tuan Pham Ngoc <github@joomdonation.com>
Co-authored-by: Fedir Zinchuk <getthesite@gmail.com>
Co-authored-by: wilsonge <georgejameswilson@googlemail.com>
Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
Co-authored-by: Crystal Dionysopoulos <9141288+crystalenka@users.noreply.github.com>
Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>
Co-authored-by: Geraint Edwards <github@copyn.plus.com>
Co-authored-by: Tony Partridge <tony@xws.im>
Co-authored-by: frostmakk <sveinung.larsen@lyse.net>
Co-authored-by: Dimitris Grammatikogiannis <d.grammatiko@gmail.com>
Co-authored-by: joomla-translation-bot <87496051+joomla-translation-bot@users.noreply.github.com>
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Co-authored-by: Sveinung Larsen <frostmakk@users.noreply.github.com>
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 <bembelimen@users.noreply.github.com>

* [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 <quy@fluxbb.org>

Co-authored-by: Quy <quy@fluxbb.org>

* 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 <quy@fluxbb.org>

Co-authored-by: Quy <quy@fluxbb.org>

* 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 <quy@fluxbb.org>

* 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 <phil@phil-taylor.com>

* Update redirect.xml

* Update redirect.php

* Update plugins/system/redirect/redirect.php

Co-authored-by: Quy <quy@fluxbb.org>

* Update plugins/system/redirect/redirect.php

Co-authored-by: Benjamin Trenkle <bembelimen@users.noreply.github.com>

* Update plugins/system/redirect/redirect.php

Co-authored-by: Quy <quy@fluxbb.org>
Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
Co-authored-by: Tobias Zulauf <zero-24@users.noreply.github.com>
Co-authored-by: Benjamin Trenkle <bembelimen@users.noreply.github.com>

* 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 <zero-24@users.noreply.github.com>

* 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 <phil@phil-taylor.com>

* 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 <phil@phil-taylor.com>
Co-authored-by: Tobias Zulauf <zero-24@users.noreply.github.com>

* 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 <brian@teeman.net>
Co-authored-by: Harald Leithner <leithner@itronic.at>
Co-authored-by: Tobias Zulauf <zero-24@users.noreply.github.com>
Co-authored-by: Allon Moritz <allon.moritz@digital-peak.com>
Co-authored-by: Quy <quy@fluxbb.org>
Co-authored-by: Nicola Galgano <optimus4joomla@gmail.com>
Co-authored-by: Roland Dalmulder <contact@rolandd.com>
Co-authored-by: Tuan Pham Ngoc <github@joomdonation.com>
Co-authored-by: Fedir Zinchuk <getthesite@gmail.com>
Co-authored-by: wilsonge <georgejameswilson@googlemail.com>
Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
Co-authored-by: Crystal Dionysopoulos <9141288+crystalenka@users.noreply.github.com>
Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>
Co-authored-by: Geraint Edwards <github@copyn.plus.com>
Co-authored-by: Tony Partridge <tony@xws.im>
Co-authored-by: frostmakk <sveinung.larsen@lyse.net>
Co-authored-by: Dimitris Grammatikogiannis <d.grammatiko@gmail.com>
Co-authored-by: joomla-translation-bot <87496051+joomla-translation-bot@users.noreply.github.com>
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Co-authored-by: Sveinung Larsen <frostmakk@users.noreply.github.com>
Co-authored-by: Akshit Rattan <akshitrattan@Akshits-MacBook-Air.local>
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.

None yet

6 participants