[MGNLUI-567] Implement direct content activation Created: 16/Jan/13  Updated: 18/Mar/13  Resolved: 31/Jan/13

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: Task Priority: Major
Reporter: Federico Grilli Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon MGNLACTIVATION-7 Implement basic activation Closed
depends upon MGNLUI-615 Display action output in the UI Closed
depends upon MGNLWORKFLOW-23 Refactoring: move some parts to ui-ad... Closed
relation
is related to MGNLUI-620 Provision actions availability Closed
is related to MAGNOLIA-4785 Move the commands definitions in webs... Closed
supersession
is superseded by MGNLUI-622 Activation/deactivation should not be... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Release notes required:
Yes
Date of First Response:

 Description   

This is basically the implementation of https://magnolia.atlassian.net/browse/BL-127
See also http://wiki.magnolia-cms.com/display/DEV/Concept+-+Basic+Activation.



 Comments   
Comment by Samuli Penttilä [ 29/Jan/13 ]

While testing I got this exception to console. /magnoliaPublic/ returns 404 so this is most likely a configuration issue. What concerns me is that in admincentral there is no feedback that something went wrong.

2013-01-29 14:31:42,527 ERROR info.magnolia.module.activation.ExchangeTask : Failed to deactivate content.
info.magnolia.cms.exchange.ExchangeException: Not able to send the activation request http://localhost:8080/magnoliaPublic/.magnolia/activation: cannot retry due to server authentication, in streaming mode
at info.magnolia.module.activation.BaseSyndicatorImpl.activate(BaseSyndicatorImpl.java:421)
at info.magnolia.module.activation.SimpleSyndicator$2.runTask(SimpleSyndicator.java:103)
at info.magnolia.module.activation.ExchangeTask.run(ExchangeTask.java:75)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.net.HttpRetryException: cannot retry due to server authentication, in streaming mode
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1257)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2300)
at info.magnolia.module.activation.BaseSyndicatorImpl.transportActivatedData(BaseSyndicatorImpl.java:435)
at info.magnolia.module.activation.BaseSyndicatorImpl.activate(BaseSyndicatorImpl.java:389)
... 4 more

Comment by Federico Grilli [ 29/Jan/13 ]

Re feedback, that should be fixed now. As to the ExchangeTask error make sure that

  • on the author instance
    • /server/activation/subscribers/magnoliaPublic8080/URL points to the correct url
  • on the public instance
    • /server/admin is false
  • on both
    • /server/activation/publicKey has the same value
Comment by Samuli Penttilä [ 30/Jan/13 ]

Thanks. Activation works after changing configuration but status column stays red until pages app is restarted. Deactivating a page does not seem to work for me as it will cause an error. Digged the exception and this is where it fails.

Caused by: javax.jcr.ItemNotFoundException: 674469eb-31c2-4dc3-aaa9-935469790539
at org.apache.jackrabbit.core.ItemManager.getItemData(ItemManager.java:384)
at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:328)
at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:622)
at org.apache.jackrabbit.core.SessionImpl.getNodeById(SessionImpl.java:536)
at org.apache.jackrabbit.core.SessionImpl.getNodeByIdentifier(SessionImpl.java:1100)
at info.magnolia.jcr.wrapper.DelegateSessionWrapper.getNodeByIdentifier(DelegateSessionWrapper.java:184)
at info.magnolia.jcr.wrapper.DelegateSessionWrapper.getNodeByIdentifier(DelegateSessionWrapper.java:184)
at info.magnolia.jcr.wrapper.NodeWrappingDelegateSessionWrapper.getNodeByIdentifier(NodeWrappingDelegateSessionWrapper.java:60)
at info.magnolia.cms.core.DefaultHierarchyManager.getContentByUUID(DefaultHierarchyManager.java:429)
at info.magnolia.commands.impl.BaseRepositoryCommand.getNode(BaseRepositoryCommand.java:69)
at info.magnolia.module.activation.commands.DeactivationCommand.execute(DeactivationCommand.java:53)
at info.magnolia.commands.MgnlCommand.executeSynchronized(MgnlCommand.java:83)
... 120 more

Comment by Federico Grilli [ 30/Jan/13 ]

Cannot reproduce the ItemNotFoundEx, likely related to something local to your environment. Will file a separate issue for the status column not updated immediately after de/activation succeeds.

Comment by Federico Grilli [ 31/Jan/13 ]

Further testing revealed that the path, workspace and identifier in an the action def would never change the after the definition class having been initialized so that you are basically activating or deactivating the same node over and over again

Comment by Samuli Penttilä [ 31/Jan/13 ]

My steps to reproduce de-activation problem.
1. Use and run ce-bundle/magnolia-empty-webapp
2. Start from fresh configuration
3. In config app: server->admin = false, server->activation->subscribers->magnoliaPublic8080->URL = http://localhost:8080/
4. Open pages app and unpublish root node demo-features
5. Two things observed:
5.a. Got error message notification about exception. (Caused by: javax.jcr.ItemNotFoundException: babb5315-f417-4083-9cf1-714bb304742f)
5.b. demo-features was deleted not just unpublished.

Deletion happens recursively. Deleted pages are not visible in old admin interface either.

Comment by Federico Grilli [ 31/Jan/13 ]

OK, you turned the author instance into a public one, setting it as a subscriber of itself, hence the error and the deletion (see related issue MGNLUI-620). The most relevant test scenario is with two magnolia instances one author and one public, that's what I tested and was successful.

Comment by Samuli Penttilä [ 04/Feb/13 ]

Works as intended with two instances. Created follow-up ticket MGNLUI-622 for the configuration issues experienced.

Generated at Mon Feb 12 08:38:06 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.