Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Creating Asset in publish instance

Avatar

Level 2

Hi all,

Trying to see if there is a way to create an asset via AssetManager and have that available on the publish instance. We need to run the service on publish as we're only getting the correct alternate language links in the publish instance and not on author. Would there potentially be a way to run the service on the publish instance and a follow up service that would be responsible for creating / saving the asset into the dam?

Alternately, we're also looking into possibly finding out why the PageTreeSitemapGenerator alternate links method returns different url maps when both seem to have the same language copies.

Any help would be appreciated. Thank you.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

It is hard to say; maybe there is something wrong with the MSM or the way the copies were created or updated. So, while a content update could be required, maybe this is something a dev should update and not necessarily a content author, for example, I've seen missing nodes that MSM requires or bad references that needed to be fixed "manually". 



Esteban Bustamante

View solution in original post

7 Replies

Avatar

Community Advisor

I think you can create some service and target it to run just on your publish instance based on run mode. 
But I would be more interested in what are the differences observed in the url map ?  I would think there might be some differences due to externalizing the links which would be due to Day CQ Link Externalizer configuration which should be expected.
Could you give some more details on this ? 

Avatar

Level 2

Hi, rather than the format of the urls being generated within the map, it's the returned map that seems to be differing between run modes. Even for the OOTB sitemap generator, I'm seeing the same differences where the alternate language url map is much shorter and missing key references for the author run mode. 

as for the service, we've currently made it run specifically on the publish run mode but we're having trouble creating the asset via assetmanager as we did before.

Avatar

Community Advisor

Could you share some sample for the differences that you are observing ? 

Avatar

Community Advisor

Hi,

Are you using AEMaaCS or an on-premise version? Just FYI, AssetManager has been deprecated and is no longer recommended. You can refer to this link: Experience Manager Cloud Service - Developer Reference Material APIs. I believe the best approach is to understand what's going on between the author and publisher content. If I understood correctly, the language copies are forcing you to create assets directly on the publishers, and also the sitemap is not functioning as it should for the same reason. If so, It seems to me that the root cause of your issue lies with the live copies, so addressing that first might put you in a better position to tackle your requirements.

 

Hope this helps!



Esteban Bustamante

Avatar

Level 2

Hi Esteban,

Yes, this is AEMaaCS. Yes, I do agree that it most likely seems to be some sort of issue stemming from the live copies on the authoring instance. I wanted to explore alternative methods as I was under the impression that addressing those issues would require re-authoring of content. Would this be correct?

Avatar

Correct answer by
Community Advisor

It is hard to say; maybe there is something wrong with the MSM or the way the copies were created or updated. So, while a content update could be required, maybe this is something a dev should update and not necessarily a content author, for example, I've seen missing nodes that MSM requires or bad references that needed to be fixed "manually". 



Esteban Bustamante

Avatar

Administrator

@asdasdsa Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni