? ? ? ? Failure

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
4 Apr 2016

Summary of Changes

The system messages are somewhat limited, since we can't change their title or even remove their title.

To solve this, this PR adds new options for system messages.

  • Allows to hide the message title.
  • Allows to add a custom title.

This PR also applies the changes need in all layouts (system, isis, protostar and beez3).

Testing Instructions

  • Test if messages are working fine
  • Then add the following code to the beggining of the index.php file of the Joomla templates (protostar, beez3, isis and hathor):
JFactory::getApplication()->enqueueMessage('Test 1: Message without group (fallbacks to <code>message</code> group).');
JFactory::getApplication()->enqueueMessage('Test 2: Message in <code>error</code> group.', 'error');
JFactory::getApplication()->enqueueMessage('Test 3: Message in <code>notice</code> group.', 'notice');
JFactory::getApplication()->enqueueMessage('Test 4: Message in <code>warning</code> group.', 'warning');
JFactory::getApplication()->enqueueMessage('Test 5: Message in <code>message</code> group (will be in the same queue as test 1).', 'message');
JFactory::getApplication()->enqueueMessage('Test 6: Message in <code>message without title</code> group.', 'message', array('showTitle' => false));
JFactory::getApplication()->enqueueMessage('Test 7: Message in <code>notice with custom title</code> group.', 'notice', array('customTitle' => 'My custom title'));
JFactory::getApplication()->enqueueMessage('Test 8: Message in <code>notice with custom title</code> group (message 2).', 'notice', array('customTitle' => 'My custom title'));
  • Check if the result is something like this (please not that in beez3 there is no message title):
    image

An effort was made to preserve B/C with existent layout overwrites. You should also test this patch in a custom template that has a message layout override (in /templates/<template-name>/html/layouts/joomla/system/message.php) (or use the one of in isis without this PR changes).

Note that before this patch this messages would look like this:
image

Observations

@mbabker i had to change JDocumentRendererHtmlMessage and enqueueMessage (normal and legacy) to make this work with the new options, please check if everything is fine with this changes.

Any suggestions and/or improvements are welcomed.

avatar andrepereiradasilva andrepereiradasilva - open - 4 Apr 2016
avatar andrepereiradasilva andrepereiradasilva - change - 4 Apr 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Apr 2016
Labels Added: ?
avatar andrepereiradasilva
andrepereiradasilva - comment - 4 Apr 2016

@mbabker can you give a little help here?
what does this mean?

There was 1 failure:
1) JApplicationCmsTest::testRedirectLegacy
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     0 => Array (
         'message' => 'Test Message'
         'type' => 'message'
+        'options' => Array (...)
     )
 )
avatar joomla-cms-bot joomla-cms-bot - change - 4 Apr 2016
Labels Added: ?
avatar mbabker
mbabker - comment - 4 Apr 2016

The test is checking the returns from getMessageQueue since there is a B/C handler with adding messages to the message queue when calling the redirect method. So any of the tests validating that behavior you'll need to add the new options array to the expectation.

avatar andrepereiradasilva
andrepereiradasilva - comment - 4 Apr 2016

thanks!
like this? eb35469

avatar mbabker
mbabker - comment - 4 Apr 2016

Should be fine now that you have the comma in there :wink:

avatar andrepereiradasilva
andrepereiradasilva - comment - 4 Apr 2016

eheheh :) thanks a lot

7b9e068 4 Apr 2016 avatar andrepereiradasilva cs
avatar brianteeman brianteeman - change - 5 Apr 2016
Labels
avatar brianteeman brianteeman - change - 5 Apr 2016
Category Layout Templates (admin)
avatar mikeveeckmans mikeveeckmans - test_item - 7 Apr 2016 - Tested successfully
avatar mikeveeckmans
mikeveeckmans - comment - 7 Apr 2016

I have tested this item :white_check_mark: successfully on 7b9e068

TEST OK
screen shot 2016-04-07 at 04 12 29
(J3.5.1, PHP 7)


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

avatar designbengel designbengel - test_item - 10 Apr 2016 - Tested successfully
avatar designbengel
designbengel - comment - 10 Apr 2016

I have tested this item :white_check_mark: successfully on 7b9e068

Tested successfully on protostar, tested without B/C issues on a Warp Template.


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

avatar MATsxm MATsxm - test_item - 10 Apr 2016 - Tested successfully
avatar MATsxm
MATsxm - comment - 10 Apr 2016

I have tested this item :white_check_mark: successfully on 7b9e068

Thanks


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

avatar brianteeman brianteeman - change - 10 Apr 2016
Status Pending Ready to Commit
Labels
avatar brianteeman
brianteeman - comment - 10 Apr 2016

RTC thanks


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

avatar joomla-cms-bot joomla-cms-bot - change - 10 Apr 2016
Labels Added: ?
avatar wilsonge wilsonge - change - 12 Apr 2016
Status Ready to Commit Needs Review
Labels
avatar wilsonge
wilsonge - comment - 12 Apr 2016

Setting to needs review. I wanna sit down and think about whether serialzing the data is the right choice here (my gut is that it isn't but I'm at the end of a long day so could be just not thinking straight!)


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

avatar joomla-cms-bot joomla-cms-bot - change - 12 Apr 2016
Labels Removed: ?
avatar andrepereiradasilva
andrepereiradasilva - comment - 12 Apr 2016

i don't like it either, but i didn't find another way without creating a new message queue and preserving B/C. But please review when you have time. If you find a better method is fine by me.

avatar wilsonge wilsonge - change - 12 Apr 2016
Milestone Added:
avatar wilsonge
wilsonge - comment - 12 Apr 2016

OK. This is a 3.6 feature anyhow - but I promise I will look over it - hopefully over the next week or so - but if not @brianteeman is going to force me to have reviewed all the Needs Review issues in the next 3 weeks ⚠️

avatar andrepereiradasilva
andrepereiradasilva - comment - 12 Apr 2016

:wink:

avatar brianteeman brianteeman - change - 13 Apr 2016
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 13 Apr 2016
Labels Added: ?
avatar roland-d
roland-d - comment - 7 May 2016

@andrepereiradasilva Can you please fix the merge conflict? Thank you.

avatar roland-d roland-d - change - 7 May 2016
Status Needs Review Information Required
Labels
avatar brianteeman brianteeman - change - 9 May 2016
Labels Added: ?
avatar zero-24
zero-24 - comment - 1 Jun 2016

@wilsonge can we move this to RTC now if @andrepereiradasilva get the merge conflicts fixed?

avatar wilsonge
wilsonge - comment - 1 Jun 2016

Yeah do it

avatar brianteeman brianteeman - change - 7 Jun 2016
Status Information Required Pending
Labels
avatar brianteeman
brianteeman - comment - 7 Jun 2016

@andrepereiradasilva can you fix the merge conflicts please and then this can be merged


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

avatar joomla-cms-bot
joomla-cms-bot - comment - 7 Jun 2016

This PR has received new commits.

CC: @designbengel, @MATsxm, @mikeveeckmans


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 7 Jun 2016

don't test yet

avatar joomla-cms-bot
joomla-cms-bot - comment - 7 Jun 2016

This PR has received new commits.

CC: @designbengel, @MATsxm, @mikeveeckmans


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 7 Jun 2016

hum all seems fine but i get this notices/warning when appling the patch, after that all seem fine

Notice: Undefined index: options in /path/to/joomla-staging/libraries/joomla/document/renderer/html/message.php on line 89
Warning: array_replace(): Argument #1 is not an array in /path/to/joomla-staging/libraries/joomla/document/renderer/html/message.php on line 89

Probably because the patchtester send a message (Github api limit) to the before patch queue system and render it in the after patch system?

Don't have much time to look into it now. So if anyone can see if this is a problem that will exist on update please say.

avatar wilsonge wilsonge - change - 8 Jun 2016
Milestone Removed:
avatar brianteeman brianteeman - change - 12 Jul 2016
Category Layout Templates (admin) Layout Templates (admin) Unit Tests
avatar brianteeman brianteeman - change - 12 Jul 2016
Labels
avatar brianteeman
brianteeman - comment - 2 Aug 2016

@andrepereiradasilva you can avoid that by adding your github credentials to the patchtester options.


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

avatar brianteeman
brianteeman - comment - 2 Aug 2016

Tested ok in isis, protostar and hathor but in beez its not quite correct

screen shot 2016-08-02 at 05 38 59


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

avatar brianteeman brianteeman - test_item - 2 Aug 2016 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 2 Aug 2016

I have tested this item ? unsuccessfully on 48f7304


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

avatar brianteeman brianteeman - change - 4 Dec 2016
Status Pending Information Required
Labels
avatar brianteeman
brianteeman - comment - 4 Dec 2016

@andrepereiradasilva can you look at the beez issue please and then we can get this tested and merged


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

avatar brianteeman brianteeman - change - 4 Dec 2016
Labels Removed: ? ? ?
avatar brianteeman brianteeman - edited - 4 Dec 2016
avatar joomla-cms-bot joomla-cms-bot - change - 4 Dec 2016
Category Layout Templates (admin) Unit Tests Administration Templates (admin) Layout Libraries Front End Templates (site) Unit Tests
avatar zero-24
zero-24 - comment - 4 Dec 2016

we have aslo conflicts here ;)

avatar mbabker
mbabker - comment - 21 May 2017

This PR needs a new owner or it will have to be closed as abandoned.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 May 2017

If this PR get no Response, it will be closed at 22th June 2017.

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Jun 2017
Status Information Required Closed - No Reply
Closed_Date 0000-00-00 00:00:00 2017-06-22 03:57:44
Closed_By franz-wohlkoenig
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Jun 2017

closed as stated above.


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

avatar joomla-cms-bot
joomla-cms-bot - comment - 22 Jun 2017
avatar joomla-cms-bot joomla-cms-bot - close - 22 Jun 2017

Add a Comment

Login with GitHub to post a comment