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

[5.3] [GSoC 21] Core Enhancement 2 - Incorporation of Modules in Articles-Edit-View #34764

Draft
wants to merge 74 commits into
base: 5.3-dev
Choose a base branch
from

Conversation

YatharthVyas
Copy link
Contributor

@YatharthVyas YatharthVyas commented Jul 12, 2021

Project Repo PR: joomla-projects/gsoc21_core-enhancements#8
Plan Document: https://docs.google.com/document/d/1Pl8JGa2hkYkmJzQOn9_mS8a4imDmqc2a/edit#heading=h.xzcjfqetxfhr


Summary of Changes

  1. Create Module in Article Edit Screen

    Users can add Modules in Articles in Joomla. This is done with the help of the Module xtd-editor Plugin. However, this Plugin opens a Modal that only allows the user to select a pre-existing module, ie. there is no option to add a new module directly in the Article Edit View.
    To enhance that, this PR introduces a button to Create Modules directly in the Article Edit View:

    add module

  1. 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.

    configure

    • Users have no option to ascertain information about the Modules imported in an article (they can only see the module id)

      image

    • Additionally, these modules cannot be directly edited in the Article Edit View.

      edit

    • 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

      remove

Testing Instructions

  1. Run npm ci to rebuild the assets
  2. Enable the Imported Modules Tab (Global Configuration -> Articles -> Editing Layout -> Show Imported Modules Switcher)
  3. Follow the GIFs above

Documentation Changes Required

I'm not sure

Mentors

@chmst @nibra @bembelimen
(and thanks @richard67)

@ceford
Copy link
Contributor

ceford commented Sep 9, 2023

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 comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34764.

@HLeithner HLeithner changed the base branch from 5.0-dev to 5.1-dev September 30, 2023 22:52
@HLeithner
Copy link
Member

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

@Razzo1987 Razzo1987 changed the title [4.1] [GSoC 21] Core Enhancement 2 - Incorporation of Modules in Articles-Edit-View [5.1] [GSoC 21] Core Enhancement 2 - Incorporation of Modules in Articles-Edit-View Nov 3, 2023
@LadySolveig LadySolveig marked this pull request as draft November 7, 2023 11:40
@HLeithner HLeithner changed the base branch from 5.1-dev to 5.2-dev April 24, 2024 09:10
@HLeithner
Copy link
Member

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

@HLeithner HLeithner changed the title [5.1] [GSoC 21] Core Enhancement 2 - Incorporation of Modules in Articles-Edit-View [5.2] [GSoC 21] Core Enhancement 2 - Incorporation of Modules in Articles-Edit-View Apr 24, 2024
@bascherz
Copy link

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

Function Location

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 comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34764.

@richard67
Copy link
Member

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".

@bascherz
Copy link

@richard67 I do not know how to do that. I don't see a way to edit a previous post. Should I just repost?


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

@bascherz
Copy link

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

Function Location

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 comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34764.

@HLeithner HLeithner changed the base branch from 5.2-dev to 5.3-dev September 2, 2024 08:54
@HLeithner
Copy link
Member

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

@HLeithner HLeithner changed the title [5.2] [GSoC 21] Core Enhancement 2 - Incorporation of Modules in Articles-Edit-View [5.3] [GSoC 21] Core Enhancement 2 - Incorporation of Modules in Articles-Edit-View Sep 2, 2024
@Hackwar Hackwar removed the PR-5.2-dev label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.3-dev
Projects
None yet
Development

Successfully merging this pull request may close these issues.