Some child site links - link back to the parent site when using folder mapping

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
8/20/2009 12:43:21 PM
Gravatar
Total Posts 29

Re: Some child site links - link back to the parent site when using folder mapping

Joe,

Sorry, I just discovered that the feeds section does not appear to be working now either.  I thought this was working in the past but since the last round of bug fixes, something must have happened.

Add a Feeds Feature, add new feed and click Save.  I've tried several feeds that were working in the past but are not working now.  Clicking on a page that contains the feeds feature (after trying to add a feed) produces an error.

 

Thanks,

Mike

8/21/2009 6:58:28 AM
Gravatar
Total Posts 29

Re: Some child site links - link back to the parent site when using folder mapping

Joe,

I found another important one this morning in the web store.  If you are in a child site's web store, add a product, then add an offer, then add 1 or 2 products to the offer and click on one of the edit links next to a product in that offer and try to save or delete the product from the offer.  This produces an error and is linked back to the parent site.

Thanks,

Mike

8/21/2009 8:33:46 AM
Gravatar
Total Posts 18439

Re: Some child site links - link back to the parent site when using folder mapping

Hi Mike,

Did you do svn update > rebuild > visit setup this morning. This and all the items you reported yesterday should already be fixed.

Best,

Joe

8/21/2009 8:41:20 AM
Gravatar
Total Posts 29

Re: Some child site links - link back to the parent site when using folder mapping

Joe,

I downloaded the latest source, rebuilt, ran setup & tested last week.  I should have a chance to do this again this weekend.  Thanks for making the fixes.  Let me know if you have time to fix to the last couple items I reported and I will get the new code & test your fixes this weekend.

Thanks!

Mike

8/21/2009 8:49:33 AM
Gravatar
Total Posts 18439

Re: Some child site links - link back to the parent site when using folder mapping

Thats what I'm saying. All the items you reported are now fixed as far as I know. I just double checked the product offer one and it works fine now.

Many of these boiled down to a single problem scenario. What was happning is in pages that use UpdatePanels, the first ajax postback would work but then the action on the form was being changed somehow to have this ../ which would make the next ajax postback post to the parent site.

The solution was just to always reset the action to the correct url in code during postback to overcome whatever was making it change.So basically I added this to every page/control using an UpdatePanel

Page.Form.Action = Request.RawUrl;

and this solved the problem making sure the form action would render the same each time during the ajax postbacks.

I discovered the problem using Firebug to inspect the html after each ajax update and I could see it was changing after the first postback. So I google for action changes after updatepanel and found the solution. Actually turns out that this ability to set the Page.Form.Action is new as of .NET 3.5 SP1.

Best,

Joe

8/21/2009 9:27:18 AM
Gravatar
Total Posts 29

Re: Some child site links - link back to the parent site when using folder mapping

Ah, that makes total sense.  Hopefully that will solve most of these parent/child link issues.  I did notice that many of these things were happening on pages/controls using Ajax postbacks... except for stuff like emails that had links that pointed back to the parent site for example.

One feature I would recommend is adding an UpdateProgress template to all of the pages that use ajax.  Sometimes async calls are firing back to the server but I'm not aware they are being made and I click something too soon and cause an error.  A simple "Working..." div or animated gif would probably do the trick.

Thanks for making the fixes, I may be able to get the code today and test it if I can squeeze in some time.  I just bought you a beer for your help.. enjoy it!  Thanks again for working on these issues.

- Mike

8/21/2009 1:20:43 PM
Gravatar
Total Posts 18439

Re: Some child site links - link back to the parent site when using folder mapping

Hey, thanks for the beer Mike!

Cheers,

Joe

8/22/2009 3:26:35 PM
Gravatar
Total Posts 29

Re: Some child site links - link back to the parent site when using folder mapping

Joe,

I tested all the fixes and they are working now.  Thanks for your efforts.

Quick question...

Is it possible to have 2 seperate installations of mojoPortal on 2 different hosting spaces that both point to the same database server?

For example,

  • Installation 1 - http://www.mymojoportal.com  (Root SiteID = 1)  (Web Server 1)
  • Installation 2 - http://www.secondmojoportal.com (Root Site ID = 7)  (Web Server 2)

But both of these sites connect to the same MSSQL Server instance and set of tables (have same connection strings).  I tried changing "UseRelatedSiteMode" = True and "RelatedSiteID "=7 on Installation 2 but when I hit the root of Installation 2 - it still points to SiteID=1.  I also moved Data/Sites/7/ folder to Installation 2.  Is there a web.config setting I can change that will let me choose the root site (parent site) to be ID 7 instead of 1?

I know this sounds confusing but I only have 1 SQL server instance but I have 2 seperate hosting spaces that I'd like to install mojoportal on.

Thanks for your help.

Mike

8/22/2009 4:11:05 PM
Gravatar
Total Posts 18439

Re: Some child site links - link back to the parent site when using folder mapping

You can do it. When you first get both sites going at first they have the exact same content right?

Go into the first site in SiteSettings and create a new site, then install features in the new site, then set the host name www.secondmojoportal.com on the new site. Then touch the web.config in the second site to recycle the app pool.

It should work and be a second site at that point.

The only issue is on upgrades you upgrade the first site and this upgrades the db for both sites, so the second site may have erros until you upload the new code there so they are both running the same code version.

Hope it helps,

Joe

8/22/2009 7:40:31 PM
Gravatar
Total Posts 29

Re: Some child site links - link back to the parent site when using folder mapping

Joe,

That makes sense; however, I'm using "folder mappings" instead of "host names" for my configuration on my sites so I don't think this will work.  I'm still messing with some things to see if I can get it to work using folder mappings.

Any ideas on this would be appreciated.

============== Here are some steps I've taken to try to get it working ===============

I did what you said so far... went into the first site and created a new site, installed features in the new site and started adding some pages.  Since I'm using folder mappings, I got it setup on (Web Server 1) by adding a folder mapping for it (www.myfirstmojoportalsite.com/newchildsite1 - SiteID=7).

Then I installed mojoportal on (Web Server 2) and the address for it is:  (www.mysecondmojoportalsite.com).  So essentially when I hit mysecondmojoportalsite, it just needs to go to the content for SiteID=7 instead of SiteID=1 which is www.myfirstmojoportalsite.com.

You are right, the content for both sites is the same starting out (SiteID=1).  I tried adding a Redirect.aspx page at the root of mysecondmojoportalsite and set my default documents to be "Redirect.aspx, Default.aspx".  The code in the redirect fires first before any of the mojoportal stuff fires.  I added code to redirect any hostnames to point to a folder mapping like this:

Redirect.aspx:

<script language=C# runat="server">
    private void Page_Load(object sender, System.EventArgs e)
    {
    String siteNameUrl=null;    
    siteNameUrl = Request.ServerVariables.Get("SERVER_NAME");
         
    switch (siteNameUrl)
    {
     default:
             {
        Response.Redirect("~/newchildsite1/");
            break;
         }
    }     
    }
</script>

This actually works and fires before any folder mapping code in the mojoportal site (since Redirect.aspx is the first default document).  So I added a folder on mysecondmojoportalsite.com/mychildsite1/ and dropped a Default.aspx page in it.  The redirect works great, however, I only get a blank Default.aspx page and it doesn't load the content for SiteID=7.  I'll keep messing with it.

====================================================================

8/23/2009 7:58:46 AM
Gravatar
Total Posts 29

Re: Some child site links - link back to the parent site when using folder mapping

Joe,

I just encountered another bug this morning with the Reset Password process.

Site Settings:

  • I'm in a child-site using folder mappings
  • I'm using email addresses to sign-in to the site
  • Password Format: Hashes in db/Cannot be Decrypted
  • All checkboxes on the Security/Main tab are checked
  • MSSQL Server 2000

Process:

I register for a new account and confirm via email.  I sign-in once and logout.  The second time I forget my password, so I follow the steps on the sign-in page to recover it.  I enter my email address, answer my security question (which appears to be case-sensitive), and it sends me an email with a garbled password like this:

Your password has been reset to qI;gV%s.#un/Zr
You may change it after signing in.

So I go back to the site I registered with, enter my email and the new garbled password "qI;gV%s.#un/Zr" but it does not work.  I get a "Login Failed" message.  Let me know if you have time to take a look at this.

Thanks,

Mike

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