Kentico site doesn't have Presentation URL?

Leo Rockswold asked on August 2, 2023 21:40

I have 5 sites where the preview link is working.

However, I can not get it working with 1 site because the site does not have a "presentation url" input in the site general settings like all the other sites.

If I go to "Sites" the broken site is only one where "content only" is set to false instead of true. I can't find a place to change that.

Are these two issues related? How do I change it from content only=No to content only=Yes like the other sites?

I'm attempting to setup preview links for this site but the option is missing. Help?

Recent Answers


Brenden Kehren answered on August 2, 2023 23:29

Can you verify the site without a presentation URL is an MVC site and not a Portal Engine site? If you query the database, you can run this query:

select * from cms_site

Then look for the field SiteIsContentOnly and if it's set to 1, it's an MVC site, if it's set to 0, then it's a Portal Engine site.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on August 3, 2023 05:54

"If I go to "Sites" the broken site is only one where "content only" is set to false instead of true. I can't find a place to change that." - this indicates that is a portal engine site. Or, if you designed the site as MVC, the DB records got messed up for some reason and I would recommend reviewing the history of changes made to the project.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 3, 2023 05:58

Looks like you updated your question Like. You can change the record directly in the database BUT it could cause some issues. I'd highly recommend looking at a backup and compare. If also recommend testing the change against a backup and seeing what happens when you change that value and run the site against it.

0 votesVote for this answer Mark as a Correct answer

Leo Rockswold answered on August 3, 2023 20:56

Looking in select * from cms_site, the column SiteIsContentOnly for that site is set to NULL

What options are there to update this site? Can I try change it in our dev environment thru the database and see if that works?

Is there risk in updating the SiteIsContentOnly to "1" thru the database?

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on August 4, 2023 05:19

Before doing any kind of change in the DB you should make a DB backup - you never know what can go wrong so you can restore the backup just in case.
Are you 100% sure that this site was developed as MVC site and not portal engine? Were you using e.g. Design tab in this site? If you are 100% sure it is an MVC model site, then set the value in the DB and restart Kentico app.

0 votesVote for this answer Mark as a Correct answer

Leo Rockswold answered on August 4, 2023 17:20

I'm not 100% sure of that. It could have been a mistakenly setup as a portal engine.

However, it is current connected to, live, and working properly with a MVC site.

Is it possible to reverse this?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 4, 2023 17:33

If the site was set up in Kentico as a Portal Engine site from the get go, and you developed it using MVC, you're going to have quite a few problems.

However, if the site was set up in Kentico as an MVC site and the field SiteIsContentOnly was changed from NULL to 1 inadvertantly in the database, then you should be ok to switch it back. Of course only before testing in a non-production environment.

My concern would be if this was working in production prior, what happened and why? We can tell you all day what to do, but not knowing details of what happened prior, what the set up was prior is difficult to determine the absolute fix for the issue. So providing as much detail as possible is best.

0 votesVote for this answer Mark as a Correct answer

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