Language Change PR-5.1-dev Pending

User tests: Successful: Unsuccessful:

avatar BrainforgeUK
BrainforgeUK
20 Apr 2024

Pull Request for Issue #43319 .

Summary of Changes

Catch errors from the extension being updated and abort update with a sensible message.

Testing Instructions

(a) Installed this Plugin.
plg_updatetest1.zip

(b) Enable the plugin.

(c) Go to Joomla updater and check for updates.

(d) Then select the plugin installed above PLG_HIKASHOPSHIPPING_BFEXTRAFEATURES and update it.

Actual result BEFORE applying this Pull Request

Error 0

Expected result AFTER applying this Pull Request

Error 1

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

avatar BrainforgeUK BrainforgeUK - open - 20 Apr 2024
avatar BrainforgeUK BrainforgeUK - change - 20 Apr 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Apr 2024
Category Administration com_installer
avatar brianteeman
brianteeman - comment - 20 Apr 2024

Cannot be tested
image

avatar BrainforgeUK
BrainforgeUK - comment - 20 Apr 2024

Try this test plugin - screenshots before applying the pull request changes.
plg_updatetest2.zip

Error 10
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Error 15
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Error 12
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Error 16

avatar brianteeman
brianteeman - comment - 20 Apr 2024

image

avatar BrainforgeUK
BrainforgeUK - comment - 20 Apr 2024

Test does not work on Unix system! - must be filename case, investigating.

avatar brianteeman
brianteeman - comment - 20 Apr 2024

I am using windows

avatar BrainforgeUK
BrainforgeUK - comment - 20 Apr 2024

Sorted, no change to the above needed, can go ahead with testing.
Appologizes for inconvenience, update server issue, not looked at that for a long time!

avatar brianteeman
brianteeman - comment - 20 Apr 2024

With Debug Disabled
image

With Debug Enabled
image

PLEASE check your work before submitting it

avatar BrainforgeUK BrainforgeUK - change - 20 Apr 2024
Labels Added: PR-5.1-dev
avatar joomla-cms-bot joomla-cms-bot - change - 20 Apr 2024
Category Administration com_installer Administration com_installer Language & Strings
avatar BrainforgeUK BrainforgeUK - change - 20 Apr 2024
Labels Added: Language Change
avatar BrainforgeUK
BrainforgeUK - comment - 20 Apr 2024

Changed.

Sorry, copied the changed code across and forgot the use statement.
Failed to check the files changed count - thought I had copied the language text across.

avatar brianteeman
brianteeman - comment - 20 Apr 2024

You also forgot to check the language string you used and the string you created.

avatar BrainforgeUK
BrainforgeUK - comment - 22 Apr 2024

Retested as: #43321 (comment)

With changes made the message is now:

restest2

avatar brianteeman
brianteeman - comment - 22 Apr 2024

I am all in favour of meaningfull error messages but they also have to be helpful. In this example the advice is not helpful at all as it means nothing at all to the user. This is a message that is only useful to the original extension developer and is not something that an end user shoudl ever see. Extension developers dont release updates without testing they work do they

avatar BrainforgeUK
BrainforgeUK - comment - 22 Apr 2024

Regardless of who is to blame for the error what I propose is better and more useful than what Joomla currently displays.

This is actually not a plugin bug - the plugin is used by and depends on a 3rd party extension, it is that dependency which causes the problem when the update is attempted with the plugin enabled. Could modify such plugins to protect against such errors but I see that as unnecessary code in the plugin when Joomla can handle it more gracefully.

I suppose could add another line to the error message:
"Please contact the extension developer."

Could enhance further by adding contact information from current XML?

avatar brianteeman
brianteeman - comment - 22 Apr 2024

The question is. Does the new message help the end user more than the original message. For me the answer is no

avatar BrainforgeUK
BrainforgeUK - comment - 22 Apr 2024

The end user is an admin who hopefully knows the extensions installed on their site.

The current error is missleading as it implies it is a bug in the Joomla installer ... which led to me being asked a question which started me on this.

avatar HLeithner HLeithner - change - 24 Apr 2024
Title
Error handling on extension update
[5.1] Error handling on extension update
avatar HLeithner HLeithner - edited - 24 Apr 2024
avatar chmst
chmst - comment - 9 May 2024

I think that this helps "Please contact the extension developer of the Plugin ... ".
Then I know that it is not a bug in Joomla or in my confirguration and don't waste time with debugging.

avatar brianteeman
brianteeman - comment - 9 May 2024

@chmst the problem is that according to @BrainforgeUK the problem is not with the developer of this plugin but with the developer of a completely different extension upon which it depends - so which extension developer am I going to contact? For me that is not the problem. The problem is that the extension that is being installed is not checking for the presence of the extension it is dependent upon. ergo nothing sensible can be changed in core to fix an extension developers errors

avatar chmst
chmst - comment - 9 May 2024

@brianteeman - thanks, agreed.

avatar brianteeman
brianteeman - comment - 9 May 2024

there is only so much that Joomla can do. Extension developers need to take responsibility for their own code being installed correctly.

avatar fgsw
fgsw - comment - 16 Aug 2024

should this PR get test or not?

avatar BrainforgeUK
BrainforgeUK - comment - 16 Aug 2024

I do't see why not.
Improves on what is there already but as indicated in previous comments it is not perfect. There can never be a perfect solution.

avatar fgsw
fgsw - comment - 16 Aug 2024

I do't see why not.

I don't see positive comments. Don't wanna waste my time.

avatar exlemor exlemor - test_item - 24 Aug 2024 - Tested unsuccessfully
avatar exlemor
exlemor - comment - 24 Aug 2024

I have tested this item ? unsuccessfully on bb1c6aa

Hi BrainForgeUK, I have really tried to test this during PBF 2024, and I am sorry, but neither pig_updatetest1.zip nor png_updatetest2.zip yield the results that you show/want... perhaps because we are testing it now against Joomla 5.2.0-beta2-dev but couldn't get it to work out ;(


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

I should specify that I considered this a fail since it did NOT include the path line and just showed the first 2 lines:

Error updating: PLG_BF_MANUAL
Class "hikashopShippingPlugin" not found

avatar TLWebdesign TLWebdesign - test_item - 24 Aug 2024 - Tested successfully
avatar TLWebdesign
TLWebdesign - comment - 24 Aug 2024

I have tested this item ✅ successfully on bb1c6aa

Tested successfully. Seems like a no brainer to me to improve this.

I've tested on J5.1.3 and then there was no path visible (3rd line in the alert) but on 5.2.0-beta2-dev it was fine.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43321.
avatar pe7er pe7er - test_item - 24 Aug 2024 - Tested successfully
avatar pe7er
pe7er - comment - 24 Aug 2024

I have tested this item ✅ successfully on bb1c6aa

Works as described.

Thank you for this PR! The new error message has more details, so it helps the website admins understand the issue better when they get such an error.

btw: I've tested this PR successfully on 5.2-dev:
screencapture-local-test-nl-administrator-index-php-2024-08-24-12_27_09


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43321.
avatar TLWebdesign
TLWebdesign - comment - 24 Aug 2024

On Joomla 5.1.3 i'm not seeing the path. I tested it both on a localhost and on a live test server.
See attached screenshot:
Scherm­afbeelding 2024-08-24 om 12 45 57

avatar brianteeman
brianteeman - comment - 24 Aug 2024

@TLWebdesign as this PR is for 5.1 and not 5.2 then you should be marking this as an unsuccessful test

avatar TLWebdesign TLWebdesign - test_item - 24 Aug 2024 - Tested unsuccessfully
avatar TLWebdesign
TLWebdesign - comment - 24 Aug 2024

I have tested this item ? unsuccessfully on bb1c6aa

On 5.1.3 i'm not getting the path to the file to show.


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

avatar HLeithner
HLeithner - comment - 2 Sep 2024

This pull request has been automatically rebased to 5.2-dev.

avatar TLWebdesign TLWebdesign - test_item - 2 Sep 2024 - Tested successfully
avatar TLWebdesign
TLWebdesign - comment - 2 Sep 2024

I have tested this item ✅ successfully on bb1c6aa

Tested Succesfully on 5.2


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

avatar HLeithner HLeithner - change - 2 Sep 2024
Title
[5.1] Error handling on extension update
[5.2] Error handling on extension update
avatar HLeithner HLeithner - edited - 2 Sep 2024

Add a Comment

Login with GitHub to post a comment