1

I am reading all Components through the Core Service for updating an anchor tag to a TCM URI. After a successful update, when I publish the Page containing the respective Component the TCM URI doesn't get resolved to a proper URL.

But when I make any change in this Component in the CME and save it, when the Page is published again, the link does get resolved to a proper URL.

I wonder why is this happening? Is there any solution for this?

Previously I had <a href="abc/xyc/aboutus.aspx">...</a> anchor tag, after updating it becomes <a href="tcm:22-20314">...</a>. This is a Components TCM URI and this Component is attached in aboutus.aspx.

  • What do you mean "updating the anchor tag to tcm Id"? and after updating by coreservice, do you see desired results in component? – Saurabh Gangwar Apr 11 '14 at 6:22
  • yes I am able to see the desired results. Updating anchor tag means adding component's tcm id into href property by replacing url. – pankaj Sharma Apr 11 '14 at 6:26
  • Can you post your anchore tag here. how it's getting formed after updating the component. – SDLBeginner Apr 11 '14 at 6:29
  • previously I have "a href="abc/xyc/aboutus.aspx""anchor tag after updating it becomes "a href="tcm:22-20314"" this is a component's tcm and this component is attached in aboutus.aspx – pankaj Sharma Apr 11 '14 at 6:35
  • @pankaj Your question is very vague and does not contain useful context information, you could consider adding a code sample from your Core Service application. Also instead of replying to a comment via another comment, you can better edit and update your question, so this information is clear for everybody. If you are asked for additional information or a clarification and you don't edit and update your question, you will not get many relevant answers. – Bart Koopman Apr 11 '14 at 8:09
1

If you're publishing components with a dynamic template and your links are not resolved, but they are resolved when publishing in a page, then probably what's happening is that the Link Resolver TBB is not available in your Component Template.

Add this TBB (or better yet, the Default Finish Actions TBB) to the end of your Component Template and try publishing again.

2

If you are trying to create a Dynamic Link your anchor should be:

<a tridion:href="tcm:x-x-x">...</a>

and your PT or CT should contain the Link Resolver Template Building Block.

0

I also faced this kind of issue. I have added xmlns="http://www.w3.org/1999/xhtml".try adding it in your anchor tag while updating the component.It may solve your problem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.