J4 Issue ?
avatar Puneet-Jain-18
Puneet-Jain-18
6 Apr 2019

Steps to reproduce the issue

go to already created articles in the backend administrator
Select a check-box of a published article
open change status toolbar list and click on publish

Expected result

Nothing Happens as the button is read-only

Actual result

The page is reloaded.
Request Probably goes to the backend(to be confirmed)

System information (as much as possible)

joomla 4.0.0 -Alpha -8 -dev

Additional comments

Similar Issue if the article is unpublished and unpublish button is clicked.

avatar Puneet-Jain-18 Puneet-Jain-18 - open - 6 Apr 2019
avatar joomla-cms-bot joomla-cms-bot - change - 6 Apr 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 6 Apr 2019
avatar Puneet-Jain-18 Puneet-Jain-18 - change - 6 Apr 2019
The description was changed
avatar Puneet-Jain-18 Puneet-Jain-18 - edited - 6 Apr 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 6 Apr 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 6 Apr 2019
avatar brianteeman
brianteeman - comment - 6 Apr 2019

The problem is that the button is not "read-only". It has a class of disabled but that's not the same thing as a disabled button

Current code

<button class="button-unpublish dropdown-item disabled" type="button">
	<span class="icon-unpublish" aria-hidden="true"></span>
	Unpublish</button>

As far as I remember it should be

<button class="button-unpublish dropdown-item disabled" type="button" disabled="true">
	<span class="icon-unpublish" aria-hidden="true"></span>
	Unpublish</button>
avatar hardik-codes
hardik-codes - comment - 6 Apr 2019

@Puneet-Jain-18 could you please recheck as I am getting this error message: One or more of the selected articles can't set be to published.

avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Apr 2019
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Apr 2019
Status Discussion Information Required
avatar Puneet-Jain-18
Puneet-Jain-18 - comment - 7 Apr 2019

@brianteeman I will try to do the changes suggested by you
@hardik-codes No, I don't get that kind of error

avatar Puneet-Jain-18
Puneet-Jain-18 - comment - 7 Apr 2019

This Kind Of behavior is handled at the backend by this code already.

unpublishBtn.addEventListener('click', (e) => { if (e.target.classList.contains('disabled')) { e.stopPropagation();

So I wanted to ask should we do changes to stop page from reloading also,??

avatar bahl24
bahl24 - comment - 8 Apr 2019

Kindly see #24517 which solves #24480 ,in that I have modified the condition for disabling of workflow buttons. Now Publish button will only be disabled only when all the selected items are published & active even if 1 of the selected is unpublished/archived/trashed (which is the expected behavior).
Similarly for other workflow buttons.
But yes the disabled buttons are clickable which shouldn't be the case.
The PR doesn't solve this issue

avatar Puneet-Jain-18
Puneet-Jain-18 - comment - 8 Apr 2019

I will have a look Thanks !!

avatar franz-wohlkoenig franz-wohlkoenig - close - 8 Apr 2019
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Apr 2019

Closed as having Pull Request.

avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Apr 2019
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2019-04-08 12:02:17
Closed_By franz-wohlkoenig

Add a Comment

Login with GitHub to post a comment