67318[FEATURE] Add event for callouts in page module
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 4
- typo3/sysext/backend/Classes/Backend/Event/PageLayoutCalloutEvent.phpnew+82 −0
- typo3/sysext/backend/Classes/Controller/PageLayoutController.php5+60 −40
- typo3/sysext/backend/Resources/Private/Templates/InfoBox.html+5 −3
- typo3/sysext/core/Documentation/Changelog/master/Feature-93192-EventForAdditionalCalloutInPageModule.rstnew+55 −0
Review log 2338
Show 713 earlier messages
-
Sybille Peters uploaded patch set 1 12/31/20, 09:38
-
TYPO3com voted on patch set 1 V -1 12/31/20, 09:47 Completed build in 09m 28s on Thu, 31 Dec, 09:47 AM Test Summary: 1 of 32781 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8517
-
TYPO3com commented on patch set 1 12/31/20, 10:10 Completed build in 40m 33s on Thu, 31 Dec, 10:09 AM Test Summary: 1 of 32781 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8517
-
TYPO3com commented on patch set 1 12/31/20, 10:43 Completed build in 1h 45m 12s on Thu, 31 Dec, 10:43 AM Test Summary: 1 of 32781 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8517
-
Andreas Kienast commented on patch set 1 12/31/20, 10:46
The Bamboo failure is real. Without the patch, a flash message is rendered on pid=0. With the applied, the flash message is missing. -
TYPO3com commented on patch set 1 12/31/20, 10:48 Completed build in 09m 47s on Thu, 31 Dec, 10:48 AM Test Summary: 2 of 32781 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8519
-
Andreas Kienast uploaded patch set 2 12/31/20, 11:08
-
Sybille Peters uploaded patch set 3 12/31/20, 11:09
-
Andreas Kienast commented on patch set 3 12/31/20, 11:13
@sybille it seems we pushed in the same minute and doesn't log I posted patch set 2 already. Please check the diff https://review.typo3.org/c/Packages/TYPO3.CMS/+/67318/1..2, IMO that one is a cleaner solution. -
Sybille Peters commented on patch set 3 12/31/20, 11:17
Reply
Yes, I just noticed too. I like your solution better too because then all flash messages are generated in one place. I just didn't want to change too much in one patch. -
TYPO3com voted on patch set 2 V +1 12/31/20, 11:19 Completed build in 10m 45s on Thu, 31 Dec, 11:19 AM Test Summary: 32540 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8520
-
Andreas Kienast uploaded patch set 4 12/31/20, 11:20
-
TYPO3com voted on patch set 3 V +1 12/31/20, 11:24 Completed build in 15m 32s on Thu, 31 Dec, 11:24 AM Test Summary: 32540 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8521
-
TYPO3com voted on patch set 4 V -1 12/31/20, 11:37 Completed build in 16m 18s on Thu, 31 Dec, 11:37 AM Test Summary: 9 of 32035 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8522
-
TYPO3com voted on patch set 4 V +1 12/31/20, 11:47 Completed build in 43m 07s on Thu, 31 Dec, 11:47 AM Test Summary: 32540 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8522
-
Sybille Peters uploaded patch set 5 12/31/20, 12:29
-
Sybille Peters uploaded patch set 6 12/31/20, 12:31
-
TYPO3com commented on patch set 5 12/31/20, 12:39 Completed build in 10m 14s on Thu, 31 Dec, 12:39 PM Test Summary: 32540 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8525
-
TYPO3com voted on patch set 6 V -1 12/31/20, 12:42 Completed build in 10m 25s on Thu, 31 Dec, 12:42 PM Test Summary: 1 of 32781 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8527
-
TYPO3com voted on patch set 6 V +1 12/31/20, 15:53 Completed build in 09m 50s on Thu, 31 Dec, 03:53 PM Test Summary: 32540 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8528
-
Oli Bartsch commented on patch set 6 01/08/21, 13:35
PageLayoutController.php:469Hi, I'm not quite sure if it's good idea to expose $pageinfo in the event since it is marked as internal. Exposing it now in the event would then be considered as public API and we can't do any changes to it in the future without being breaking. -
Sybille Peters commented on patch set 6 01/08/21, 14:43
PageLayoutController.php:469ReplyAh, ok. That makes sense. We could just pass the uid. It is a bit difficult to determine what an event listener might need. But the uid might be sufficient. -
Oli Bartsch commented on patch set 6 01/08/21, 16:38
PageLayoutController.php:469ReplyI'm fine with providing more information. I just suggest we create either a custom object or an array. Then we directly see and control which information we expose and can take care of them, independent of internal property changes. Example: If we pass ['id' => $this->id, 'foobar' => $this->pageInfo['foobar]] and then decide to drop $id, we just have to take care to still pass the value for 'id'. No matter where the value comes from. We could then e.g. use $request->getQueryParams['id'] instead (Just as an example). -
Sybille Peters commented on patch set 6 01/11/21, 15:19
PageLayoutController.php:469ReplyGenerally I agree - it is not good that there is an internal data structure which may change and external API depends on this - however $this->pageinfo is the page record, it is not a data structure of PageLayoutController but dynamically created based on the pages record. And using a data structure like this as parameter is also used in public API elsewhere, e.g. BackendUtility::getRecordTitle where $row is passed as second parameter. Since this passing of arrays and passing contents of a row to public functions is so common I am really not sure what to do here. So, I understand the principle, but how to apply this here? In any case, passing the whole record is probably not necessary. Deciding which fields to use and which not is however not so easy. For the usecase I currently have in mind, I only need the uid. The difficulty is to determine which values should be passed to the event. If we just pass an array now that currently contains for example uid, sys_language_uid, doktype and title and then add more later that would be equally awkward. If we just pass the id and event listeners need more they have to do an extra query. Isn't a huge problem, but unnecessary. -
Sybille Peters uploaded patch set 7 02/04/21, 07:32
-
TYPO3com voted on patch set 7 V -1 02/04/21, 07:38 Completed build in 06m 27s on Thu, 4 Feb, 07:38 AM Test Summary: 32585 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9244
-
Sybille Peters commented on patch set 7 02/04/21, 07:41
I changed the event name and some text to use the term "callout" instead of flashmessage as it appears this is the correct term, see https://forge.typo3.org/issues/93422#note-2 I believe the function name PageLayoutController::getHeaderFlashMessagesForCurrentPid() is thus incorrect, but will handle this in separate patch.PageLayoutController.php:469ReplyA new array is now created which includes the most relevant info from $this->pageinfo. So it is not necessary to pass the array. Also, the already existing messages are not passed to the event. This is (probably) not necessary. This way it is no longer possible to change existing messages (which should not be necessary. -
Sybille Peters uploaded patch set 8 02/04/21, 07:44
-
Sybille Peters updated the commit message in patch set 9 02/04/21, 07:45
-
Sybille Peters uploaded patch set 10 02/04/21, 07:48
-
TYPO3com voted on patch set 8 V +1 02/04/21, 07:53 Completed build in 08m 47s on Thu, 4 Feb, 07:53 AM Test Summary: 32585 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9245
-
TYPO3com voted on patch set 9 V +1 02/04/21, 07:56 Completed build in 10m 12s on Thu, 4 Feb, 07:56 AM Test Summary: 32585 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9246
-
TYPO3com voted on patch set 10 V +1 02/04/21, 07:58 Completed build in 06m 48s on Thu, 4 Feb, 07:58 AM Test Summary: 32585 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9247
-
Richard Haeser commented on patch set 10 02/15/21, 10:04
Personally I'm not sure if this is the way to let people know something is "wrong" with the page. Those callouts are more system related messages if you ask me. I think showing a "status" for a page should be done in a bit less prominent way. More than happy to think about a proper way to give an editor information about status. I have this in mind for several years now. I even thought about mini-widgets in the page module, but that is to prominent as well I guess. With the Yoast and PageSpeed Insights extension, I have exactly the same and when both are installed giving a "status" of your page, it will make editors need to scroll before they can work. That should not be the case IMHO. What do you think? -
Sybille Peters commented on patch set 10 02/15/21, 19:09
Reply
@Richard The reason, I started with this patch was to have this for linkvalidator. I have already implemented this in my fork and am using it. It is a big hit: people are finally starting to use the functionality and are fixing broken links because they get the "callout" on the page with broken links and a link to jump to the linkvalidator module. Some of the current callouts show information where something is wrong with a page - and usually where an editor needs to do something, e.g. missing shortcut target, etc. Or a hint to jump to the list module. So I had seen them not so much system-related but information for the editor. It's probably best to discuss this elsewhere. Some thoughts: I also see the need for a more extensive concept for this. Having several of these "callouts" one after the other looks pretty ugly. Also for some of these problems, the content elements are marked (e.g. in red or orange), for example for "mixed language mode" or for elements in undefined colpos. Otherwise the information is not so useful if the problem CEs are not pointed out. Then you have the problem if you have several of these problems and more then one marks the CEs, it gets confusing. So it would be nice to only activate one of the problem types. (e.g. have a radio-button or list type functionality at the top). I think a concept should consider, how and when should problems or suggestions for editors be displayed, e.g. as report via email, as a list of problems with possibility to edit (e.g. as in linkvalidator), or rather on top of page like yoast or the callouts. Or several of these. IMHO, showing the information on top of the page is not enough as there are often some pages which are sadly neglected and never visited. What I think would be good to have a general framework where extensions could hook into. What I had also in mind was a new module named "Todo" or something like that and where you can show configurable problem areas, such as - missing shortcut - unfinished translations (we sometimes have translations with still the default text in them e.g. Copy to English") - etc. Linkvalidator is just a subset of showing problematic content. I think this should be handled in a more general way. And made extendable. -
Richard Haeser commented on patch set 10 V -1 02/16/21, 08:40
The -1 is just to make sure we discuss this before we go on with this one. Thanks for this patch! This will for sure help to get this idea forward!Reply Unresolved
That's exactly what I mean. I think the idea to help editors telling them what is wrong with their page is awesome. The way how to do it is something that needs some thoughts. I will investigate how other CMSes are doing this (if they do) and will try to talk to some UX people how we can do this in a proper way. -
Richard Haeser commented on patch set 10 02/17/21, 10:55
I created https://forge.typo3.org/issues/93531 to create an overview of tasks that we should do to have a unified way to give editors feedback on their content. -
Sybille Peters abandoned the change 02/17/21, 11:11
Abandoning: See notes, suggestion was made to design this on a more general level, see https://forge.typo3.org/issues/93531