User tests: Successful: Unsuccessful:
Project Repo PR: joomla-projects/gsoc21_core-enhancements#8
Plan Document: https://docs.google.com/document/d/1Pl8JGa2hkYkmJzQOn9_mS8a4imDmqc2a/edit#heading=h.xzcjfqetxfhr
Imported Modules Tab
Note: To test this feature, you must enable "Show Imported Modules" in the com_content Global Configuration OR in the Configure Edit Screen Tab. Also, remember that the tab is only visible when you Import a Module and Save it.
Users have no option to ascertain information about the Modules imported in an article (they can only see the module id)
Additionally, these modules cannot be directly edited in the Article Edit View.
There is no user-friendly way to removing these modules. It requires a person to backspace the {loadmoduleid id}
string from the article text which may not seem very intuitive to someone that is not tech-savvy. So to make this process more smooth, the users can now remove the tab with the click of a button in this tab
npm ci
to rebuild the assetsI'm not sure
@chmst @nibra @bembelimen
(and thanks @richard67)
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_content com_modules Language & Strings Repository NPM Change JavaScript |
Something for you to review with your mentors.
Everything in this code is dependent on adding modules to the content using the syntax {loadmoduleid 1}
However modules can also be added to content using alternative syntax
Any modules present in the content using either of these alternatives will not be included in the tab containing "imported modules"
However modules can also be added to content using alternative syntax
When modules are added, is does not matter. The id is unique, the name was a small help for users - but the name is not always unique.
@chmst you miss the point.
Because a module can be added to an article with three different syntax (and if I remember correctly the id method was not the original) a user will expect all the modules in an article to be displayed in the imported modules tab. With the way the current code is here that will not be the case.
Labels |
Added:
?
NPM Resource Changed
?
|
The new commits address 2 of the improvements suggested by @brianteeman
I've used a cookie here as I need to access its contents using both PHP (to not display the Save and Close button in Toolbar for unsaved modules) and JavaScript (to clear this flag when we close the modal). Hiding Save and Close button is necessary here because we need to make sure that the module is saved (in our database) before we close the modal so we can grab the module's ID.
loadposition
):Only the positions are shown and not the modules under these positions because that requires us to know the menu id for the article's page (can be in multiple pages) and then mapping the menu ID to position to modules which will be a costly performance impacting query.
{loadmodule mod_type}
are not displayed in the new tab. This should be implemented.All 3 Types of module import syntax are considered in the imported modules tab
The new addition here is the Modules Imported by Type Section. Here's how it works:
loadmodules
pluginModuleHelper:getModule
returns a valid modulemod_
as a prefix to the name and call the ModuleHelper:getModule
functionLabels |
Added:
?
?
Removed: ? ? |
Labels |
Added:
Language Change
?
Removed: ? ? |
Labels |
Added:
?
Removed: ? |
This pull request has automatically rebased to 4.2-dev.
This pull requests has been automatically converted to the PSR-12 coding standard.
Labels |
Added:
?
?
Removed: ? |
This pull request has been automatically rebased to 5.0-dev.
I have tested this item ? unsuccessfully on dcad97f
If I apply the patch and start a new article I get this above the edit form:
Deprecated: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /Users/ceford/Sites/joomla-cms/administrator/components/com_content/src/Model/ArticleModel.php on line 462
Deprecated: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /Users/ceford/Sites/joomla-cms/administrator/components/com_content/src/Model/ArticleModel.php on line 478
Deprecated: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /Users/ceford/Sites/joomla-cms/administrator/components/com_content/src/Model/ArticleModel.php on line 506
Deprecated: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /Users/ceford/Sites/joomla-cms/administrator/components/com_content/src/Model/ArticleModel.php on line 462
Deprecated: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /Users/ceford/Sites/joomla-cms/administrator/components/com_content/src/Model/ArticleModel.php on line 478
Deprecated: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /Users/ceford/Sites/joomla-cms/administrator/components/com_content/src/Model/ArticleModel.php on line 506
I can create a new module but it is not inserted in the edit form - so this feature seems pointless.
This pull request has been automatically rebased to 5.1-dev.
Title |
|
Labels |
Added:
Feature
PR-5.1-dev
Removed: ? ? |
This pull request has been automatically rebased to 5.2-dev.
Title |
|
Labels |
Added:
PR-5.2-dev
Removed: PR-5.1-dev |
I have tested this item ? unsuccessfully on dcad97f
I do not know what "npm" is or how to execute it. So that aside, after installing the patch I get the following error when either editing an existing article or creating a new one. I have seen this during testing of other patches during PBF.
An error has occurred.
0 There is no "com_content.admin-article-edit" asset of a "script" type in the registry.
Call Stack
1 () JROOT/libraries/src/WebAsset/WebAssetRegistry.php:135
2 Joomla\CMS\WebAsset\WebAssetRegistry->get() JROOT/libraries/src/WebAsset/WebAssetManager.php:274
3 Joomla\CMS\WebAsset\WebAssetManager->useAsset() JROOT/libraries/src/WebAsset/WebAssetManager.php:208
4 Joomla\CMS\WebAsset\WebAssetManager->__call() JROOT/administrator/components/com_content/tmpl/article/edit.php:26
5 include() JROOT/libraries/src/MVC/View/HtmlView.php:416
6 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/libraries/src/MVC/View/HtmlView.php:204
7 Joomla\CMS\MVC\View\HtmlView->display() JROOT/administrator/components/com_content/src/View/Article/HtmlView.php:135
8 Joomla\Component\Content\Administrator\View\Article\HtmlView->display() JROOT/libraries/src/MVC/Controller/BaseController.php:697
9 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_content/src/Controller/DisplayController.php:65
10 Joomla\Component\Content\Administrator\Controller\DisplayController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:730
11 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
12 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
13 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:150
14 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:195
15 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:306
16 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:58
17 require_once() JROOT/administrator/index.php:32
I have tested this item ? unsuccessfully on dcad97fI do not know what "npm" is or how to execute it. So that aside, after installing the patch I get the following error when either editing an existing article or creating a new one. I have seen this during testing of other patches during PBF.
@bascherz NPM is the Node Package Manager which we use to maintain our javascript dependencies and to generate the js and css from the sources. If you haven't used it and haven't used a prebuild package for testing this PR, then your test is not valid as it is not sufficient just to apply the changes e.g. with the patchtester.
Please change back your test result to "Not tested".
@richard67 I do not know how to do that. I don't see a way to edit a previous post. Should I just repost?
I have not tested this item.
I do not know what "npm" is or how to execute it. So that aside, after installing the patch I get the following error when either editing an existing article or creating a new one. I have seen this during testing of other patches during PBF.
An error has occurred.
0 There is no "com_content.admin-article-edit" asset of a "script" type in the registry.
Call Stack
1 () JROOT/libraries/src/WebAsset/WebAssetRegistry.php:135
2 Joomla\CMS\WebAsset\WebAssetRegistry->get() JROOT/libraries/src/WebAsset/WebAssetManager.php:274
3 Joomla\CMS\WebAsset\WebAssetManager->useAsset() JROOT/libraries/src/WebAsset/WebAssetManager.php:208
4 Joomla\CMS\WebAsset\WebAssetManager->__call() JROOT/administrator/components/com_content/tmpl/article/edit.php:26
5 include() JROOT/libraries/src/MVC/View/HtmlView.php:416
6 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/libraries/src/MVC/View/HtmlView.php:204
7 Joomla\CMS\MVC\View\HtmlView->display() JROOT/administrator/components/com_content/src/View/Article/HtmlView.php:135
8 Joomla\Component\Content\Administrator\View\Article\HtmlView->display() JROOT/libraries/src/MVC/Controller/BaseController.php:697
9 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_content/src/Controller/DisplayController.php:65
10 Joomla\Component\Content\Administrator\Controller\DisplayController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:730
11 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
12 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
13 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:150
14 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:195
15 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:306
16 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:58
17 require_once() JROOT/administrator/index.php:32
This pull request has been automatically rebased to 5.3-dev.
Title |
|
Labels |
Added:
PR-5.3-dev
Removed: PR-5.2-dev |
When you use the NEW button why do you have to repeat everything in order to select and insert the module. This should be a single step.