Blog republished on another page.

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
9/18/2012 6:13:35 AM
Gravatar
Total Posts 38

Blog republished on another page.

Hi,

A page on my site holding a blog instance was deleted.  I recovered the content by creating a new page and republishing the blog content instance on that page.  I can see all old posts, and read new posts, but when I attempt to read content created before the accident, I get the error: "Sorry, you are not allowed to view this content. If you have questions about your permissions, please contact a site administrator."

I've got "All users" permissions on the page and the content instance.

Would someone please advise?

Thanks

9/18/2012 8:07:38 AM
Gravatar
Total Posts 18439

Re: Blog republished on another page.

Blog is not designed to be used on mutiple pages and it is a problem to move it from one page to another.

Why?

Because it uses friendly urls that map to a real url with the page id included as an url parameter.

ie a blog post with url /my-cool-post.aspx is mapped to the real url /Blog/ViewPost.aspx?pageid=x&mid=y&ItemID=z

so when you move it to a different page the page id in the real url no longer matches the page that blog is on and security enforcement prevents viewing the page.

It can be fixed but it is tedious to fix it. You can go through each blog post url in Administration > Advanced Tools > Url Manager and change the pageid in the real url to mathc the new page.

Best to avoid this problem by not moving a blog after you make posts.

Hope that helps,

Joe

9/18/2012 11:44:10 AM
Gravatar
Total Posts 38

Re: Blog republished on another page.

Thanks for explaining.

Would the following query alleviate the tedium, or just break something else? 

 

Update mp_friendlyurls set realurl = REPLACE(realurl,'pageid=x&','pageid=y&')

where CHARINDEX('pageid=x&',realurl,0) >0

and siteid = n

 

 

9/18/2012 11:46:51 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Blog republished on another page.

If your original page was deleted in error, I think you should be able to create a new page with the original name and URL, and publish the blog to that page to avoid needing to change all of the friendly pages. You may need to remove any automatically created 301 Redirect that gets created when you specify that duplicate URL (Administration, Advanced Tools, 301 Redirect Manager).

Jamie

9/18/2012 11:50:39 AM
Gravatar
Total Posts 18439

Re: Blog republished on another page.

Using a query seems like a reasonable idea but I cannot make promises about whether a query will cause a problem or not. Best to make a backup of your db and test your query on a copy of the db first to make sure it works as you intend. Then decide for yourself whether to do it on production and have another backup ready to restore if something really goes wrong.

You must sign in to post in the forums. This thread is closed to new posts.