[PUBLISHING-179] Opening Publishing Tools app on public fails with an error Created: 09/Jan/23  Updated: 14/Feb/23  Resolved: 09/Feb/23

Status: Closed
Project: Publishing
Component/s: None
Affects Version/s: 1.3.6
Fix Version/s: 1.4.0, 1.3.7

Type: Bug Priority: Neutral
Reporter: Jan Haderka Assignee: Adam Siska
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 1.5d Time Spent: 1.5d
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: PNG File Screenshot 2023-01-09 at 8.39.50.png     PNG File Screenshot 2023-01-09 at 8.40.05.png     PNG File image-2023-01-16-09-30-11-867.png    
Sub-Tasks:
Key
Summary
Type
Status
Assignee
PUBLISHING-181 Implementation Sub-task Completed Adam Siska  
PUBLISHING-182 Code review Sub-task Completed Fernando Cherchi  
PUBLISHING-183 Preint QA + PM Sub-task Completed Jaromir Sarf  
PUBLISHING-184 QA for 6.2 Sub-task Completed Quach Hao Thien  
PUBLISHING-185 Get token and integrate Sub-task Completed Adam Siska  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Epic Link: Maintenance of Publishing module
Sprint: Nucleus 29
Story Points: 2
Team: Nucleus
Work Started:

 Description   

Opening Publishing Tools app on public instance generates an error. See attached screenshots for details.
One could argue that it should either work or be hidden.

Credits for discovering the issue: https://stackoverflow.com/questions/74980229/magnolia-war-produces-error-in-publishing-module/74991453?noredirect=1#comment132397151_74991453



 Comments   
Comment by Ahmed Mamdouh [ 09/Jan/23 ]

It generates an error on the default war as well not just the public instance in the bundle.

Comment by Roman Kovařík [ 13/Jan/23 ]

As asiska correctly pointed out, there is a section in the app which is meant to work only on public instances.

Shouldn't the first section be hidden on public instances in that case (and therefore this issue would not happen) and vice versa?

Comment by Adam Siska [ 16/Jan/23 ]

For sure we could refactor app layout, but as this is old fw app it is not probably worth/necessary. As you can see on screenshot key generator buttons is already disabled on public instance. (https://git.magnolia-cms.com/projects/MODULES/repos/publishing/browse/magnolia-publishing-app/src/main/java/info/magnolia/publishing/app/PublishingViewImpl.java#117)


Thien's suggestion just to prevent crash should be enough here.. Maybe for more clarity (but anyway repeating info from header text of the subapp) we can add some explaing message, e.g.:

Current public key
no public key available as nothing was published yet from author instance
Comment by Ahmed Mamdouh [ 16/Jan/23 ]

Shouldn't the WAR file be usable as a public or an author instance?

If I deploy the WAR on two servers, how can I generate a key on one of them to use it on the other one if the publishing tool generates an error by default?

Comment by Adam Siska [ 16/Jan/23 ]

Hello caisys 

> It generates an error on the default war as well not just the public instance in the bundle.

On the author instance there are always initial keys, so there should be no problem like this.

>  how can I generate a key on one of them to use it on the other

As you can read in the header of this tool/app, one can transfer the key to the public instance manually or by publishing any item to it. You can check it for example here:
https://demo.magnolia-cms.com/.magnolia/admincentral#app:publishing:publishing
vs.
https://demopublic.magnolia-cms.com/.magnolia/admincentral#app:publishing:publishing

(these instances are restarted each hour, so if the tool on public instance is working somebody probably published something already, imho the best time to try it to see the error is few minutes after the top of the hour)

Comment by Roman Kovařík [ 16/Jan/23 ]

Hi caisys

Shouldn't the WAR file be usable as a public or an author instance?

I agree. Does any of the latest comments suggest otherwise?

If I deploy the WAR on two servers, how can I generate a key on one of them to use it on the other one if the publishing tool generates an error by default?

The key has to be generated on the author instance as public instance can't generate a public key as it doesn't know the private key.

 

Regards

Roman

Comment by Roman Kovařík [ 20/Jan/23 ]

Grooming:

  • Use a message "Public key not transferred yet"
Generated at Mon Feb 12 10:36:08 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.