?
avatar PhilETaylor
PhilETaylor
10 Jan 2021

Steps to reproduce the issue

Install Joomla 4 in PHP 7.2
Login to admin console

Expected result

Two messages

  • PHP Version Warning
  • Joomla asking for permission to send statistics

OR

One message at a time - not both trying to render and one trumping the other

Actual result

Watch the video of me repeatedly hitting refresh in the browser - Note the flash of red on page load (that's the PHP version warning)
I have a very fast browser, but on slow computers/browsers this might be more of a render jump.

Screen.Recording.2021-01-10.at.05.10.37.pm.mp4

System information (as much as possible)

safari on macOS

Additional comments

An informational message should never delete a red warning/error message!

One I click [Never] send the stats the stats notice disappears (correctly) and no PHP version warning is visible.

only after a hard page refresh do I get the PHP version warning

Screenshot 2021-01-10 at 17 14 11

avatar PhilETaylor PhilETaylor - open - 10 Jan 2021
avatar joomla-cms-bot joomla-cms-bot - change - 10 Jan 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 10 Jan 2021
avatar PhilETaylor PhilETaylor - change - 10 Jan 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 10 Jan 2021
avatar PhilETaylor PhilETaylor - change - 10 Jan 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 10 Jan 2021
avatar PhilETaylor PhilETaylor - change - 10 Jan 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 10 Jan 2021
avatar infograf768
infograf768 - comment - 11 Jan 2021

Confirmed. It can also be tested by keeping the stats plugin displaying Joomla asking for permission to send statistics and modifying any item status in a manager in order to get a message.

We do not get the issue in J3

Screen Shot 2021-01-11 at 11 32 03

avatar infograf768
infograf768 - comment - 11 Jan 2021

@Fedik
I have the feeling that the stats plugin alert display closes other alerts and would need some js tweaks.
The layout is using <joomla-alert contrary to J3 where the layout is a simple div.
Any idea?

avatar Fedik
Fedik - comment - 11 Jan 2021

Hard to say, need to look,
<joomla-alert is a custom element from joomla-projects/custom-elements

The message is a lang string PLG_QUICKICON_PHPVERSIONCHECK_UNSUPPORTED from quickicon/phpversioncheck plugin.

I suspect or message markup is broken, or something with script, or even styling.

It only Safari, or other browsers also?

avatar infograf768
infograf768 - comment - 11 Jan 2021

All browsers here.

avatar infograf768
infograf768 - comment - 11 Jan 2021

But, as i said, the issue is not special to the php version check. It is present in every manager when an action results in a message and the stats plugin is present.

avatar wilsonge
wilsonge - comment - 11 Jan 2021

My best guess is that the JS API in core.js is removing any messages enqueued by the PHP API (haven't looked at the code - just guessing from my phone)

avatar Fedik
Fedik - comment - 11 Jan 2021

yeah, well it stats-message.js

if (json && json.html) {
messageContainer.innerHTML = json.html;
messageContainer.querySelector('.js-pstats-alert').classList.remove('hidden');
initStatsEvents(getJson);
}

It remove all content, and insert own message,
On fast local server you even do not notice any blinking.

I will make PR, later.

avatar wilsonge
wilsonge - comment - 11 Jan 2021

Oh ffs. so we just need to move it to the Joomla.renderMessages function in core.js then

avatar Fedik
Fedik - comment - 11 Jan 2021

It not really possible to use Joomla.renderMessages here, as the stats plugin render whole message with own markup for this fancy styling.

I have updated stats-message.js a bit, please test #32011

avatar richard67 richard67 - close - 11 Jan 2021
avatar richard67
richard67 - comment - 11 Jan 2021

Closing as having a pull request. Please test #32011 . Thanks in advance.

avatar richard67 richard67 - change - 11 Jan 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-01-11 17:18:52
Closed_By richard67

Add a Comment

Login with GitHub to post a comment