MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Bug ? Why mobile site blog post takes the user to desktop website ?  (Mono Support )

Viewed 23727 time(s), 11 post(s) 1/21/2013 7:06:42 PMby super
super

super

1/21/2013 7:06:42 PM
I amnot sure if this is a bug or what but when a user is accessing monox website from a mobile device. If user clicks on blog post title to read complete blog post, it takes the user to desktop website rather than expanding blog and keeping the user to mobile website.

This currently process eliminated the use of having a mobile site if at the end it is still taking the user to desktop theme ?

I have checked the mobile/ blog template / bloglist.htm - it is using the same title link tag as regular desktop theme may be that is why it is taking the user to desktop theme ? is there any mobile title link tag that I can use ?

Please provide me a solution, I am kind of close to deadline ?
This content has not been rated yet. 
6018 Reputation 709 Total posts
kpeulic

kpeulic

1/23/2013 9:02:24 AM
We test this functionality and everything works fine.
Could you please provide us with steps how to reproduce this issue?
This content has not been rated yet. 
1849 Reputation 181 Total posts
super

super

1/23/2013 3:22:28 PM
Steps

1) Make sure mobile site is enabled in webconfig

2) Try to view the site from your mobile phone

3) Go to blog from the mobile site

4) Now, you will see all the blog post - to read a specific blog post, click on any blog post title

5) Instead of keeping you on the mobile site, it will take you to the desktop site

So logically.. as you are on your mobile site, the url is : http://www.domain.com/MonoX/Mobile/blog/posts/MonoX/

The moment you click on any blog post, the url becomes: http://www.domain.com/blog/post/MonoX/7/Cloud-storage-for-your-data/

It seems like a BUG

Could you please provide a quick solution so that I can apply it on my website ?
This content has not been rated yet. 
6018 Reputation 709 Total posts
kpeulic

kpeulic

1/23/2013 3:51:33 PM
Could you, please, go to the MonoX Nightly build: http://nightly.mono-software.com/ and test there from your mobile device.
This content has not been rated yet. 
1849 Reputation 181 Total posts
super

super

1/23/2013 4:41:47 PM
On your nigtly website, it works fine but the strange thing is that I am using the current nighty build - My current version:
4.7.40.4233 (1/18/2013)
Could you please provide me the code for mobile template of blog post and blog template of this nightly website so that I can double check with my code and update it if there is any change or correction ?
This content has not been rated yet. 
6018 Reputation 709 Total posts
super

super

1/23/2013 7:15:24 PM
I even downloaded today's nightly build (4.7.40.4244 (1/23/2013) and matched the template code with my code and updated it with today's nightly build code for template but still when I click on blog post title from mobile side, it takes me to the desktop site, why ?

Here is the code that I have in BlogList.htm (Mobile):

<li class="xfolkentry <# UnpublishedClass #>">
    <h2><a href="<# Link #>" class="taggedlink"><# Title #></a></h2>
    <div class="author-date">
        <span class="author">Author: <a href="<# AuthorLink #>"><# Author #></a></span
        <span class="pub-date"><# PubDate #></span>       
    </div>   
    <br />
    <div class="text description"><# Description #></div>
    <br />
    <div class="tags-categories">
        <div class="categories"><# Categories #></div>
        <div class="tags"><# Tags #></div>
    </div>
    <br />   
    <div class="options" style="text-align: right;">
        <span class="comments"><# Comments #></span>
    </div>
</li>
This content has not been rated yet. 
6018 Reputation 709 Total posts
mzilic

mzilic

1/24/2013 10:37:22 AM
Hello,

Have you modified any of the default Blog related URL rewrite rules?

Regards,
Mario
This content has not been rated yet. 
2218 Reputation 300 Total posts
super

super

1/24/2013 12:37:48 PM
Mario,

This is the only change I made in web config for blog: (since khorvat recommended this HERE)


<rewrite url="^(.*)/(.*)/post/(.*)/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?BlogSlug=$3&BlogPostId=$4&$7" name="BlogPost" defaultPage="/Blog.aspx" urlPattern="/{PageName}/post/{Blog.Slug}/{IdentityId}/{Slug}/" />


TO


<rewrite url="^(.*)/(.*)/post/(.*)/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?BlogSlug=$3&BlogPostId=$4&$7" name="BlogPost" defaultPage="/Blog.aspx" urlPattern="/Blog/post/{Blog.Slug}/{IdentityId}/{Slug}/" />


Same change for the grouplist url..

I did this change because when any user clicks on blog on homepage, it keeps the user on homepage only but I want user to go to blog section if anyone clicks on blog title on homepage (since I have blog web part on homepage). I also have group list on homepage like popular group list etc so same thing I did for groups url ..

Is this the reason why my mobile site is taking the user to desktop website because url is being changes to "/Blog" ? not the current {PageName} ?

Is there any way I can keep this functionality for desktop website that it takes user to blog but for mobile it keeps the user on mobile site ?
This content has not been rated yet. 
6018 Reputation 709 Total posts
mzilic

mzilic

1/24/2013 1:36:01 PM
Hello,

Yes this is your problem. Kristijan recommended several approaches in that topic, please create your own rewrite rule and use the implementations suggested in that thread by configuring the BlogPostList.UrlSingleBlogPost as described.

Regards,
Mario
This content has not been rated yet. 
2218 Reputation 300 Total posts
super

super

1/24/2013 2:40:53 PM
Thank mario - could you please help me with that ? I just posted something HERE
This content has not been rated yet. 
6018 Reputation 709 Total posts
1 2