NPM Resource Changed ? ? ? Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
29 Jul 2021

Pull Request for Issue #34968 .

Summary of Changes

Port PR #34776 to the 4.0-dev branch.

Testing Instructions

  1. Install latest akeeba, enable the system plugin (backup on update) and the action log plugin.
  2. Point your update server to the Joomla 4 nightlies (custom URL: https://update.joomla.org/core/nightlies/next_major_list.xml) in order to get the pre-update checker shown.
  3. Apply this PR
  4. Clear the browser / JS cache.

Actual result BEFORE applying this Pull Request

The pre upgrade checker shows a message about potentially not compatible plugins within that package.

Expected result AFTER applying this Pull Request

The pre update checker shows no message about that plugins cause they are compatible..

Documentation Changes Required

None.

avatar richard67 richard67 - open - 29 Jul 2021
avatar richard67 richard67 - change - 29 Jul 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 29 Jul 2021
Category JavaScript Repository NPM Change
avatar dgrammatiko
dgrammatiko - comment - 29 Jul 2021

@richard67 you can filter the array:

if (extensionData.compatibilityData.resultGroup === 3) {
  PreUpdateChecker.nonCoreCriticalPlugins = PreUpdateChecker.nonCoreCriticalPlugins
    .filter((plugin) => plugin.package_id === extensionId || plugin.extension_id === extensionId);
}
avatar richard67
richard67 - comment - 29 Jul 2021

@richard67 you can filter the array:

if (extensionData.compatibilityData.resultGroup === 3) {
  PreUpdateChecker.nonCoreCriticalPlugins = PreUpdateChecker.nonCoreCriticalPlugins
    .filter((plugin) => plugin.package_id === extensionId || plugin.extension_id === extensionId);
}

I should invert the condition, I think, because the old code removed elements from the array if matching that condition.

avatar richard67 richard67 - change - 29 Jul 2021
The description was changed
Labels Added: NPM Resource Changed ?
avatar richard67 richard67 - change - 29 Jul 2021
Title
[4.0] [WiP] Correctly handle multiple critical extensions within an package that is joomla 4 compatible
[4.0] Correctly handle multiple critical extensions within an package that is joomla 4 compatible
avatar richard67 richard67 - edited - 29 Jul 2021
avatar richard67
richard67 - comment - 29 Jul 2021

Setting release blocker as inherited from the issue.

avatar joomdonation
joomdonation - comment - 29 Jul 2021

I should invert the condition, I think, because the old code removed elements from the array if matching that condition.

I think the original code suggested by @dgrammatiko is correct. Filter will remove element from array when condition match, so we should not invert the condition. Could you please check that?

avatar joomdonation
joomdonation - comment - 29 Jul 2021

@richard67 Sorry, my bad.

avatar richard67 richard67 - change - 29 Jul 2021
The description was changed
Labels Added: ?
avatar joomdonation joomdonation - test_item - 29 Jul 2021 - Tested successfully
avatar joomdonation
joomdonation - comment - 29 Jul 2021

I have tested this item successfully on 509a356


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

avatar hans2103
hans2103 - comment - 29 Jul 2021

BEFORE

local joomla4 nl_administrator_index php_option=com_joomlaupdate (3)

AFTER

local joomla4 nl_administrator_index php_option=com_joomlaupdate (2)

avatar hans2103 hans2103 - test_item - 29 Jul 2021 - Tested successfully
avatar hans2103
hans2103 - comment - 29 Jul 2021

I have tested this item successfully on 509a356


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

avatar richard67 richard67 - change - 29 Jul 2021
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 29 Jul 2021

RTC


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

avatar Kostelano
Kostelano - comment - 29 Jul 2021

@hans2103 Sorry for the offtopic. Can you please tell me how to get such a page? Which update server should I use? Thanks in advance.

avatar richard67
richard67 - comment - 29 Jul 2021

@Kostelano

  • Point your update server to the Joomla 4 nightlies (custom URL: https://update.joomla.org/core/nightlies/next_major_list.xml) in order to get the pre-update checker shown.

  • In case if you are on a current 4.0-dev branch or latest nightly so your version is already 4.0-rc6-dev, edit file libraries/src/Version.php and change const EXTRA_VERSION = 'rc6-dev'; to const EXTRA_VERSION = 'rc6-dev';. Then reload the page and use again the button to check for updates, and then the pre-update check should be shown.

avatar wilsonge wilsonge - close - 30 Jul 2021
avatar wilsonge wilsonge - merge - 30 Jul 2021
avatar wilsonge wilsonge - change - 30 Jul 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-07-30 07:18:49
Closed_By wilsonge
Labels Added: ?
avatar richard67
richard67 - comment - 30 Jul 2021

Thanks all - testers, merger, and @dgrammatiko for the idea to use array.filter.

Add a Comment

Login with GitHub to post a comment