404 on preview & edit in kentico12

Luis Youn asked on August 1, 2019 07:42

Hi there,

I put some codes to enable preview and page-builder and made the home route and landing-page router in the MVC site.

If I run the edit or preview of the homepage in the admin site with below url, it works fine.

If I try to access with below, it works fine.

So, I assume that if I have a correct route and url pattern, it would works fine.

But, if I try to other with below, it doesn't work. It goes to 404.

But, if I try to with just below, it works fine.

Can anyone help me come to know what I missed?


Correct Answer

Luis Youn answered on August 2, 2019 07:48

I found the reason why some of pages go to 404 by accident.

In the page types, I missed "/" in the front of URL pattern.

e.g) "{%DocumentCulture%}/Landing/{%NodeAlias%}" instead of "/{%DocumentCulture%}/Landing/{%NodeAlias%}"

0 votesVote for this answer Unmark Correct answer

Recent Answers

Roman Hutnyk answered on August 1, 2019 17:28

We had that issues when admin and MVC apps were on different domains - that causes cross domain issue and preview fails.

So we resolved it by hosting apps under the same domain, e.g domain.com for MVC app and domain.com/admin for administration.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.