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/11/2009 9:22:16 PM
Gravatar
Total Posts 29

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

Hi Joe!

First off, let me say thank you and others who have developed this awesome framework.  I'm a .Net developer and I'm in the process of evaluating mojoPortal.  I will surely be donating some $ if I can get it working to fit my needs

Background Info:

  • Hosting @ DiscountASP.Net (Windows Servers)
  • MS SQL Server 2000
  • 2.3.1.0 MSSQL

I'm having some issues with link relativity in child sites.  First I setup my parent site and haven't had any issues with links.  Next I created some child sites for testing using the folder mapping setting (For example: http://myrootsite.com/childsite1/default.aspx)

Some of the links and even "save" button functions in my child sites take me back to my parent site but not all.

For example: (in childsite1)

The link in the header of the site to "Register" looks like this: http://myrootsite/childsite1/Secure/Register.aspx (perfect) but on the login page body, the extra "Register" link next to the Recover Password link looks like this: http://myrootsite/Secure/Register.aspx (referencing back to my Parent site).  The page source for this link looks like this: <a id="ctl00_mainContent_LoginCtrl_lnkRegisterExtraLink" href="../../Secure/Register.aspx">Register</a>  ( ../../Secure/Register.aspx - is taking me back to my parent site home page)

Another example: (in childsite1)

I've added a Web Store and added a new product.  The link to edit this product also does not have my "childsite1" mapping, it just links back to the parent site and obviously produces an error since this product doesn't exist on my parent site.  But the "New Product" link to add a new product does link to the correct "childsite1" and is ok.  When I add a new product and click "Save", the record saves in the database but it takes me back to my parent site/AccessDenied.aspx instead of returning me to the childsite1 product list.

I've noticed a number of these types of issues with folder mapping in the child sites when using certain features of mojoPortal.  Some of the links/save button navigation in the child sites work but some do not map to the child site folder correctly.  Is there a setting I'm missing in the web.config file?

I have been searching the forums/web for answers to these issues but I'm not having any luck.  Any help you can provide is greatly appreciated.

Thanks,

Mike

 

 

8/12/2009 6:29:20 AM
Gravatar
Total Posts 18439

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

Hi Mike,

These sound like bugs to me I will investigate today and see if I can re-produce and fix the ones you have mentioned. If you find any more please list them. Its possible that some of the webstore ones are fixed in the 2.3.1.3 version as I have some recollection of seeing those not long ago.

Thanks,

Joe

8/12/2009 8:00:50 AM
Gravatar
Total Posts 29

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

Thanks for the quick response Joe!

If you take a look at the issue today, here are some other places I've found the same or similar issue:

  • Web Store: Add or Edit a Product: "Save" button
  • Product and Offer Administration Pages: (breadcrumb link: Store > Store Manager )
  • The "Add to Cart" link works on the products list page, but when you are on the "Product Details..." page, the "Add To Cart" BUTTON actually navigates back to the parent site after it adds the item to your cart.
  • Basic Event Calendar: (click next or previous month links actually appends 2 child site dirs like this (http://myparentsite/childsite1/childsite1/events.aspx?visdate17=2009-09-01T00%3a00%3a00  and produces a page not found error)
  • Newsletter Administration: after adding newsletters, all the "edit" links are not relative to the child site (eg. http://myparentsite/eletter/LetterInfoEdit.aspx?l=60203497-5374-4870-b8d0-48488a3e0d40  (missing myparentsite/childsite1/eletter)
  • Survey feature: Add new question (choose a type - any) and click "Add New Question" button (navigates back to parent site)

Thanks again for looking into this.

8/12/2009 1:18:23 PM
Gravatar
Total Posts 18439

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

Hi Mike,

I've fixed these today. The calendar and couple of the web store ones were already fixed in the current release but many of them I was able to find and fix. So these issues will be fixed in the next release and the fixes will be available to developers in svn trunk by later tonight. 

Thanks for the bug report.

Best,

Joe

8/12/2009 1:33:59 PM
Gravatar
Total Posts 18439

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

Hey Mike,

Thanks for the beer! Much appreciated.

Cheers,

Joe 

8/12/2009 1:34:27 PM
Gravatar
Total Posts 29

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

Thanks so much Joe... I just bought you a beer!

Can you tell me what the best way is to install the app updates to my hosting server?  Obviously I have 2 options..

  1. Wait for the new release & download
  2. Get the source code tonight/tomorrow, compile and make a release build for my hosting server (DiscountASP).

I have not done an 'upgrade' of mojoPortal yet and the initial mojoPortal FTP process to my hosting servers took many, many hours to complete (thousands of files).  Is there a way faster way to install a new release of mojoPortal via FTP to my hosting server? (I suppose if I don't upload all of the graphics & image files that should save a lot of time?

Thanks again...

Mike

8/12/2009 1:49:02 PM
Gravatar
Total Posts 18439

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

Hi Mike,

If you get a local build from svn trunk working on your machine, you can produce a package the same way I do using the free UnleashIt tool

It does require ftping the files again. First produce a local package then you can prune out some files to reduce some of what gets uploaded. There is some info on our FAQ about things that can be left out. Like you can chop out some of the javascript and you can chop out setup files for databases you are not using. Just be very careful so you don't end up pruning out needed files that may have changed. There are new siteimages and message templates and help files so if you skip some of those folders you may miss new files.

Notes about upgrading are here. Its basically a matter of uploading the new files and then visiting the setup page again.

Best,

Joe

8/19/2009 9:26:06 PM
Gravatar
Total Posts 29

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

Joe,

Thanks for fixing the bugs I reported last week.  I downloaded and installed the latest source from the "Trunk".  All of your fixes appear to be working well!  I continued testing and evaluating the product since last week and have discovered a few more things related to the same parent/child site navigation issues.  All of these bugs occur when in a "Child" site using the "Folder Mapping" as described in my previous posts.

Let me know when you have a chance to make these fixes and I will download the current source and test again.  Thanks so much for your help on these issues.  I love this product and hope to use and promote it as soon as all of the parent/child link issues are worked out.

Latest Bugs:

When subscribing to a child site with "require email confirmation" turned on, the link sent in the confirmation email works but it's linked to go to the "Parent" site, not the child site.  This would be confusing to a user who subscribed to a site and the confirmation link takes them to a different site.

Survey Feature:
Add New Survey, Add New Page, Add/Edit (Question Count), Choose a type of question and click the button "Add New Question" (this is still linked to the parent site and will not let you add a question to the child site survey page). There may be other child/parent related issues with survey but this is as far as I could get since I can't add any questions.

Shared Files Feature:
Add a new folder, click "Rename" (the Update and Cancel buttons appear to be linked back to the parent site).
Add a new folder and click on the folder to view the contents (the "Up one level" button and the "Delete" button both appear to be linked back to the parent site).
Files added to the root of the shared files feature works ok but adding files to a folder or sub-folder do not work and are linked back to the parent site.

Download Terms Administration:
Click on the "Unlimited" term edit link. The "Save", "Delete", and "Cancel" buttons are all linked to the parent site, not the child site they are on. This also applies to "adding" a new download term.

Discount Administration:
Add a new discount. This seems to be working ok. But then click the link to "Edit" the newly added discount and it takes you back to the parent site. Make sure the "Save" and "Delete" buttons work on the edit page as well.

Thanks again,

Mike

8/20/2009 6:38:24 AM
Gravatar
Total Posts 18439

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

Hi Mike,

Thanks for the follow up testing. I will fix these today. Getting very close to a new release so please let me know any others you find so I can get them fixed before the release.

Best,

Joe 

8/20/2009 12:34:41 PM
Gravatar
Total Posts 29

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

Joe,

Thanks!  I found another small thing today:

Blog Feature:
The calendar is enabled on the right, click a day (link) on the calendar, then click a different date... it appears to be linked back to the parent site. I'm not sure what clicking on a date is supposed to do exactly (show entries for that day?)

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

8/23/2009 11:16:40 AM
Gravatar
Total Posts 18439

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

I recommend use Encrypted passwords instead of hashed. Hashed passwords cannot be recovered so a new random password is generated, but its poorly implemented because it really should send a link that the user would have to click before it resets the password.

Does it work different in a root site? I don't really think its related to folder sites.

btw, please help me keep the forums organized. This thread is about child sites navigating back to the parent but we have moved t other topics. Please one topic per thread so that if others ahve the same question the topic make sense vs the search results.

Hope it helps,

Joe

8/23/2009 12:09:05 PM
Gravatar
Total Posts 29

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

Joe,

No problem.  Sorry for skipping topics.  I'll take the password encryption - non-hashing into consideration.  Also, I figured out my hosting problem.  I had tried what you said about setting the hostname with 2 separate installations Webserver 1 & Webserver 2 (using the same MSSQL database) and it didn't work the first time, but I tried it again and it worked.  Not sure what I did wrong the first time.  But I got it working...

My Solution in case you are interested:

www.myfirstmojoportalsite.com (Installation 1 - web.config - set to use folder mappings)

www.mysecondmojoportalsite.com (Installation 2 - web.config - set to use hostname mappings and add a hostname mapping on the site I want to become the parent site for this root i.e. - www.mysecondmojoportalsite.com - SiteID=7)

It works now!

Thanks,

Mike

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