No Code Attached Yet bug
avatar rogercreagh
rogercreagh
8 Mar 2024

Steps to reproduce the issue

  1. Only one extension has update available detected in the list on the Extensions: Update page
    Check the box and click the Update button

  2. Repeat again with two or more extensions with updates in the list, and select at least 2 to be updated

  3. Repeat again with multiple updates available, but this time only check one. This time the expected result is achieved.

Expected result

The extensions' descriptions (from the extension XML file) and any output from the extensions' scripts postflight() functions should be displayed.

Actual result

Nothing is displayed.

If there are more than one extension with updates available but only one is updated then the output is displayed.

System information (as much as possible)

Joomla 5.0.3

Additional comments

I can understand that in the case where multiple updates are done it might be difficult as the screen would be cleared between each one being done, although in the case of Joomla 3 the last one's output would remain be visible. Now nothing is displayed.

If it is not feasible to concatenate the extension_messages (which I think would be the best solution, even if some of them are quite large - there is often useful info in the extension_message created by the developer which the admin doing the updates may need to see ) then a simpler fix would be when updating multiple extensions to put the extension name, xml description, and new version in a system message box so that there was at least a visual confirmation for the admin of what had been done as well as any error messages.

Personally I think the best solution would be not to allow multiple updates to be processed in a batch. It is relatively seldom that there are more than five or six to be done (unless you are lazy and don't bother to do any for a year or more). It is normal behaviour elsewhere (eg when selecting an article to edit in com_content) to only process the first checked item.

When there is only one extension to be updated the the extension_message should be displayed consistent with the current behaviour if one a single update is done from a list of two or more, or when performing an update by uploading a file to the install page manually.

The extension_message output can contain useful and import information from the developer which the admin may need to see. It should always be displayed (despite some developers tendency to abuse it with excessively large graphics or adverts for their other products.

avatar rogercreagh rogercreagh - open - 8 Mar 2024
avatar joomla-cms-bot joomla-cms-bot - change - 8 Mar 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Mar 2024
avatar rogercreagh rogercreagh - change - 8 Mar 2024
The description was changed
avatar rogercreagh rogercreagh - edited - 8 Mar 2024
avatar brianteeman
brianteeman - comment - 8 Mar 2024

sounds like a bug as those messages should be queued so they will all be displayed once the extensions complete updating

avatar brianteeman
brianteeman - comment - 8 Mar 2024

in the case of Joomla 3 the last one's output would remain be visible. Now nothing is displayed.

In my test the output of the last one was displayed

avatar rogercreagh
rogercreagh - comment - 8 Mar 2024

in the case of Joomla 3 the last one's output would remain be visible. Now nothing is displayed.

In my test the output of the last one was displayed

Interesting, in my 5.0.3 nothing gets displayed apart from anything the component install scripts put in enqueueMessage() when either multiple components are updated or there is only one component to be updated.

A thought (not yet tested) could it be that nothing is displayed if all available components are updated (which would obviously include the case where there was only one to be updated) - it is possible I didn't test by selecting 2 for update out of a list of three. I'll check again in a mo (or possibly not till Monday cos its bedtime here and weekend away from keyboard)

avatar rogercreagh
rogercreagh - comment - 8 Mar 2024

Yes indeed - the problem comes when ALL the listed extensions are updated - my mistake - but still a bug.

If you update 2 out of three components you do get the last component script output.

But there's a problem with that - you get only one enqueued message saying Updating component was successful. because the enqueueMessage() function doesn't repeat messages with identical content, so although a message is generated for each update the admin doesn't know if one or two (or more) component updates have taken place, plus the output from only the last script to be processed is displayed - which might further convince the admin that only one update has actually occurred and the other has silently failed!

If all of the items in the list are updated then there is no output - presumably because there is no list to display the update view is clearing the display and showing the jigsaw icon and a repeat of the Check for Updates button instead - so the last output has been lost.

It's a mess that needs sorting out. Of course the problem doesn't occur if you do the items in the list one at a time until you get to the last one when the output is lost.

So two things needed to fix it - firstly restrict the processing to do only one item even if several are checked, and secondly change the display when the list is empty after processing the last item so that the output doesn't get lost.

Personally I think it is bad practice to process several updates in a batch as even if the admin did get to see all the output there may be actions or links provided by the developer in all of them, and once he clicks one (unless it opens in a new tab) the output from the others gets lost.

Finally even if only processing one update the simple Updating component was successful. message should be enhanced (for example by including the component name) so that the message from each update was unique and the admin can see what has happened if batch processing is allowed.

It needs someone familiar with the com_installer component to do this.

avatar brianteeman
brianteeman - comment - 8 Mar 2024

Personaly speaking its not a big deal and as you consider it bad practice to update several at once then presumably its not therefore an issue that you face.

The messages are important on installs but rarely on updates. Do you have any real world example

avatar rogercreagh
rogercreagh - comment - 9 Mar 2024

Its an issue I frequently face because I tend to do updates as they arrive so it is unusual to have more than one in the list - and when there is only one the message is not displayed.

Real world example - many developers put a link to the changelog in the text (and hopefully an explicit note of any breaking changes.
A bit late of course since you've already installed it by the time you get the message, but better than never. I generally like to know what has changed in case I need to make adjustments on the site or my workflow.

In ideal world all developers would start to use the Joomla changelog xml format so that you could easily review changes before and after installing from within the joomla site admin interface. It is rather a good new feature of J5 I think.

And then there is the other issue of the unhelpful enqueued messages generated by com_installer. It would be so easy and obvious to add the component name at the begining of component successfully installed and also to the message in the page that prints the component xml description. It just looks amateur and incomplete the way it is.

avatar Hackwar Hackwar - change - 26 Mar 2024
Labels Added: bug
avatar Hackwar Hackwar - labeled - 26 Mar 2024
avatar akshehu
akshehu - comment - 11 Apr 2024

All seem to have updated without an error message.


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

Add a Comment

Login with GitHub to post a comment