Missing/nulled links after removing one website

After removing one of our two dev websites in Litium back office, some links and redirects in the remaining one stopped working correctly. While we do not know for sure if the deletion of our previous main development website was the cause of this we believe so.

For example: When we click confirm order we are not redirected to the other page because the link doing so is null. The values in the pointerPage appears to be valid except for the channelSystemId which is zeroed. The zeroed channelSystemId is used to find the url which obviously finds nothing.

What we believe the same issue also occured in the order history page where the order history is also returned as a nulled page address. The order history page iteself does work when checked directly in back office.

What could be the cause of the missing ChannelSystemId?

Litium version: 7.1

Hi,
The selection of page pointers has been changed in 7.1 so it is context based instead of channel based. If you upgrade it from 7.0 it is possible that the channel ids have been removed from the page pointers. Order carrier has also channel id. Change the return row as follows.

return _urlService.GetUrl(_pageService.Get(pointerPage.EntitySystemId), new PageUrlArgs(pointerPage.ChannelSystemId != Guid.Empty ? pointerPage.ChannelSystemId : orderCarrier.ChannelID));

1 Like

This worked!
Is there a general solution which could be used or created to ensure that all PointerPageItem have their ChannelSystemId?

(Note: The order history issue we have is a page pointer which is auto mapped to a link model, “myPagesPage.GetValue(PageFieldNameConstants.OrderHistoryLink).MapTo()”, which does not appear to have easy access to a new ChannelID)

While I would really prefer not to edit all page pointers to conform to some new standard, I am however quite curious about how the page pointers should be used now. Is there some documentation or an example somewhere?

In most cases, you will not need to have the channel id, then at runtime, we will get the channel id of the current website. Then you should set null for the channel id. Unless if you want to always display the page in a specific channel.

I think you can have a sql script to update all page pointer

1 Like

It seems to me like the best approach is to fix each issue individually when they are encountered and the OrderHistoryLink was an unrelated issue which I’ve now fixed.

Thanks for the help

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.