J4 Issue ?
avatar Bakual
Bakual
12 Jun 2017

Steps to reproduce the issue

  • Create or edit a menuitem of type "Single Article"
  • Select an article
  • Try to edit that article by using the "Edit" button

Expected result

The selected article is loaded into the form in the modal

Actual result

Empty form in the modal, like when creating a new article

Additional comments

From what I saw the URL that is loaded from within the modal is http://localhost/joomla4/administrator/index.php?option=com_content&view=article&layout=modal&tmpl=component&c7dfd92edd252bd329b97a6431da2de8=1&task=article.edit&id=%27%20+%20document.getElementById(
So there is something wrong with the JS part that is supposed to read the ID of the article from the input.

avatar Bakual Bakual - open - 12 Jun 2017
avatar joomla-cms-bot joomla-cms-bot - change - 12 Jun 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 12 Jun 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 12 Jun 2017

Issue confirmed.

avatar franz-wohlkoenig franz-wohlkoenig - change - 12 Jun 2017
Status New Confirmed
avatar franz-wohlkoenig franz-wohlkoenig - change - 12 Jun 2017
Category com_content JavaScript
avatar Bakual
Bakual - comment - 13 Jun 2017

@dgt41 Do you know what changed here between J3 and J4? Because the code doesn't look that different to me so I suspect a change in another place (modal?)

avatar dgt41
dgt41 - comment - 13 Jun 2017

%27%20+%20document.getElementById(
Well that part should be a number but it's actual javascript. Probably an error in the field modal js

avatar Bakual
Bakual - comment - 13 Jun 2017

Yep, I figured out that myself ?
The JavaScript is supposed to read the number but it looks like the URL got encoded and thus it breaks.
It's working fine with the same code in J3.

avatar Bakual
Bakual - comment - 19 Jun 2017

@dgt41 I had a look again and the only difference I found which may be the cause is #15374.
Before, the URL was used as an attribute of the iframe tag. Apparently it worked to have a JS part in that URL.
Now the URL is used in a data-url and the JS part is now broken.

I have no idea how that could be solved but it seems important to fix. From what I saw, #16639 is the same or at least a similar issue.

avatar dgt41
dgt41 - comment - 19 Jun 2017

I have no idea how that could be solved but it seems important to fix.

Of course everything that is currently broken needs to be fixed, but looking at the great picture of J4 this will be fixed when we transition to custom elements for modals (and tabs, accordion, dropdown). All I'm saying is you re right this is broken and needs a fix, but let's wait till we have the UI components in place (in other words let's not waste man hours on this as it will be fixed later on)

I hope my comment makes some sense :)

avatar Bakual
Bakual - comment - 19 Jun 2017

I'd prefer to have it fixed soon as I already wasted a few hours on it only to find out that it's the same "known" issue. I guess it will be the same fix anyway that needs to be applied for BS modals as it would be for custom elements.

avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Nov 2017
Status Confirmed Discussion
avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J4 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar brianteeman
brianteeman - comment - 25 Mar 2018

Confirming that the edit button is still broken

avatar brianteeman
brianteeman - comment - 23 Jul 2018

One year later and we are still waiting for the panacea of custom elements to fix everything. With only one person working on custom elements we really need to rethink if its an achievable thing to do

avatar Quy
Quy - comment - 24 May 2019

This appears to be fixed and related to PR #25001.

avatar franz-wohlkoenig franz-wohlkoenig - change - 24 May 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-05-24 19:23:53
Closed_By franz-wohlkoenig
avatar franz-wohlkoenig franz-wohlkoenig - close - 24 May 2019

Add a Comment

Login with GitHub to post a comment