Admin toolbar switched from new to old style

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/19/2011 10:31:21 AM
Gravatar
Total Posts 13

Admin toolbar switched from new to old style

I'm using mojoportal-2-3-6-7-sqlce-net40-deploymentfiles

Have a site running on local Windows 7 computer, with Web Matrix 7.1
Have a remote copy of the site on shared hosting with ASP.Net 4.0.

Both sites functioning OK.

Initially, both sites used the correct new style Admin toolbar. Recently, however, the remote hosted site started displaying what looks like an old style toolbar.

I tried the following tests so far, but none solved the problem:

Database
No known differences in local and remote databases, but uploaded local copy to remote site again anyway.

web.config
Only difference between local and remote files is SMTPServer value, but uploaded local copy to remote site anyway.

Skin
For selected skin (styleshout-envision), uploaded local copies of style.css and layout.master, though no known differences.

After reading that “many of the skins have now been updated to display the Administrative Links in a hideable toolbar at the bottom”, I selected two alternative skins on the remote site, first andreasviklund-02, then artisteer-30business1.

On my local site, both alternative skins display the new style toolbar, though with artisteer-30business1, the Administrator page display a listing rather than the icons. The remote site displays old style toolbar and Administrator page listing with both these alternative skins.

CONCLUSION
I suppose I could upload the complete site again to the remote host, and that would be my final test! This should solve the problem, but then I won’t know what caused it, in case it was due to some action I myself took. I would prefer to know, for future reference.

Any suggestions?

 

9/19/2011 11:07:27 AM
Gravatar
Total Posts 55
mojoPortal Community Expert
Arvixe Web Hosting / mojoPortal Community Liaison Looking for quality mojoPortal hosting? Try Arvixe Check out the MojoPortal Blogs at Arvixe

Re: Admin toolbar switched from new to old style

Hi,

You could try uploading your local site to a new remote site (ie, create a new subdomain and a new database and change the publish settings to publish to the new website).

That way you can test if re-publishing your local site works and if it does copy across from the old site to try to identify what's caused the problem.

Spike

9/19/2011 12:43:59 PM
Gravatar
Total Posts 18439

Re: Admin toolbar switched from new to old style

I would caution you about uploading the entire site, if you do it to a different installation as Spike said it should be ok but if you upload it to your current site keep in mind that SQL CE is a file based database, if you upload the db file from your local machine it will overwrite the db on the server with your local copy and you want to avoid doing that.

The admin toolbar is just a skin/design element, so uploading a skin is sufficient for any changes about it.

Nothing about the admin toolbar has changed in any included skins in a very long time.

Hope that helps,

Joe

9/19/2011 12:45:59 PM
Gravatar
Total Posts 18439

Re: Admin toolbar switched from new to old style

You might also look in your log to see if it is logging anything that says it couldn't load your master page, it will fall back to a known master page if it fails to load and that fallback one may not have the toolbar.

Hope that helps,

Joe

9/19/2011 2:53:14 PM
Gravatar
Total Posts 55
mojoPortal Community Expert
Arvixe Web Hosting / mojoPortal Community Liaison Looking for quality mojoPortal hosting? Try Arvixe Check out the MojoPortal Blogs at Arvixe

Re: Admin toolbar switched from new to old style

Following on from what Joe said, I would definitely suggest you make sure you have a backup of anything important if you're copying files to / from your published site, even if you don't expect it to affect your live site. Tools like WebMatrix make things easy but as a side-effect also make it very easy to accidentally overwrite things you weren't intending to (for example, forget to update the destination url and you could end up overwriting your live site not the duplicate).

 

9/19/2011 4:13:02 PM
Gravatar
Total Posts 13

Re: Admin toolbar switched from new to old style

Spike,

I'm using FireZilla FTP, rather than Publishing from within Web Matrix, so I can selectively upload files. I also used FTP initially, as the documentation recommends uploading a new site in several stages (i.e. groups of files), to avoid upload problems.

Your suggestion to "copy across from the old site to try to identify what's caused the problem" is noted. Presumably you mean that by a process of elimination, the 'culprit' file might be found. Before doing that, I'll check Joe's suggestions. Also, someone else may recall a similar incident on their site.

Joe,

You wrote "I would caution you about uploading the entire site ..." The remote site is temporary hosting only, where the eventual site owner can see the design and functionality available. It's stored in a sub-folder off my own web site. 

The local site is the design site, but only while I'm still adding features. As the design progresses, I FTP the database, overwriting the current database, and also upload any images I may have added (the owner is aware any content he adds would be lost).

I know this would not be good practice for the production site (when the owner will start to add content), so at that stage the local site will be abandoned and changes will only be made on an owner-selected host.

You suggested I "might also look in your log to see if it is logging anything that says it couldn't load your master page". Just now, I signed in, then examined the currentlog.config file, and there are no new entries relating to this event.

It does appear to be a styling issue. I don't know which CSS file styles the Admin toolbar, but I will try to locate it and compare that file on the remote and local sites. I haven't (as far as I can recall) modified the toolbar style (never occurred to me to do so, and it's fine as it is). Yet on one day last week the toolbar style displayed changed unexpectedly, and I don't yet know how that happened.

James

9/19/2011 5:11:21 PM
Gravatar
Total Posts 13

Re: Admin toolbar switched from new to old style

If it helps to illustrate the problem, please see this set of snapshots:

http://www.kellyitsupport.co.uk/forum-attachments/admin-toolbar/new-to-old-style.jpg

The first two images show the new (or current) style used for the admin toolbar and the icon-based menu on the administration page. This is what my site looked like until recently.

The next two images show what I presume is the old style for the admin toolbar and administration page text-based menu. This is how, unexpectedly, my site now looks.

I didn't make any conscious design change and am trying to find out what HTML or CSS has changed to produce this effect!

James

9/20/2011 9:04:45 AM
Gravatar
Total Posts 13

Re: Admin toolbar switched from new to old style

Finally made some progress with my investigation!

Signed in, and then browsed to same page on local PC site and remote hosted site.

Used View Source to capture each page’s source HTML, and then used WinMerge to compare.

Only differences I could see were:

  • One extra line on the remote hosted site, which was an extra hidden viewstate input control. Possibly not relevant, though the page design is same on local and remote sites.
     
  • Many ‘Href’ differences due to remote site located in a sub-folder (Virtual Directory) below that host’s root.

Then I noticed the Href differences were not consistent in the case of all stylesheet paths on the remote site. Following are examples (of about 22 stylesheet files in total)

<link rel='stylesheet' type='text/css' href='/Data/style/jqtoolbar/style.css' />
<link rel='stylesheet' type='text/css' href='/Data/style/forums/style.css' />
<link rel='stylesheet' type='text/css' href='/Data/style/CalExtender/Calendar.css' />
<link rel='stylesheet' type='text/css' href='/Data/style/adminmenu/style.css' />
<link rel='stylesheet' type='text/css' href='/Data/style/common/style.css' />
<link rel='stylesheet' type='text/css' href='/gowran-demo-1/Data/Sites/1/skins/styleshout-envision/style.css' />
<link rel='stylesheet' type='text/css' href='/gowran-demo-1/Data/Sites/1/skins/styleshout-envision/stylemenu.css' />
<link rel='stylesheet' type='text/css' href='/gowran-demo-1/Data/Sites/1/skins/styleshout-envision/styletreeview.css' />
<link rel='stylesheet' type='text/css' href='/gowran-demo-1/Data/Sites/1/skins/styleshout-envision/styleblog.css' />
<link rel='stylesheet' type='text/css' href='/gowran-demo-1/Data/Sites/1/skins/styleshout-envision/styleforum.css' />

where /gowran-demo-1/ is the sub-folder where the remote site is located (it was setup as a Virtual Directory).

In particular, editing the browser URL, I was unable to download the toolbar (jqtoolbar) CSS file from /Data/style/jqtoolbar/style.css, but could download it from /gowran-demo-1/Data/style/jqtoolbar/style.css. This would explain the new style toolbar not being displayed correctly.

I noticed the Forum stylesheet had a similar path difference, so I added a Forum to the remote site, and found that some icons (e.g. Folder, New Topic, Pencil) were not displayed, again (presumably) due to an incorrect CSS file path.

OK, I know I may have made life difficult for myself by using a Virtual Directory rather than a sub-domain.
Yet, for the first few days of it’s life, the remote site correctly displayed the new style Admin toolbar, until one day it stopped doing so (unfortunately, I don’t have the stylesheet paths from earlier to prove that).

I will change to a sub-domain instead, which is a more realistic home for the demo, until the site’s eventual host is available.

Whether there’s an issue for mojoPortal here (i.e. 12 of the 22 stylesheets paths different, but not all), I don’t know.

9/20/2011 12:29:31 PM
Gravatar
Total Posts 18439

Re: Admin toolbar switched from new to old style

Hi,

On your production site you really don't want to be having all those css files loaded separately that is not good for your Yslow/Page speed score because each one is another http request needed to load the page and that slows down the page.

You should let mojoPortal combine and minify the css and you should enable caching by keeping these settings:

<add key="CombineCSS" value="true"/>
<add key="MinifyCSS" value="true"/>
<add key="CacheCssOnServer" value="true"/>
<add key="CacheCssInBrowser" value="true"/>

That said, it should resolve the urls correctly when you load them separately, else I would consider it a bug. What version of mojoPortal are you running? You can find the version under Administration > System Information

Hope that helps,

Joe

9/20/2011 1:07:52 PM
Gravatar
Total Posts 13

Re: Admin toolbar switched from new to old style

Joe,

From my initial post:

I'm using mojoportal-2-3-6-7-sqlce-net40-deploymentfiles

Have a site running on local Windows 7 computer, with Web Matrix 7.1

Have a remote copy of the site on shared hosting with ASP.Net 4.0.

Currently, this is a new site with very few changes to the default unzipped files, except for Skin selection and some pages with content. Currently only a demo, hopefully to let the eventual owner see how he can create and edit content.

Still learning and probably breaking other 'rules' also, but when I study the documentation more and discover 'best practices', I'll apply them to the production site.

I guess there are some steps I need to take to 'clean up' the design, in addition to the suggestion you just made. Thanks for that - I will add it to my To Do list.

Actually, I will do that shortly and let you know if it resolves the issue (though I may still move the site to a sub-domain for the demo).

I didn't want to suggest a Bug, but I was surprised by the inconsistency in CSS paths, and that this changed unexpectedly. If useful, you are welcome to a copy of any file you wish to inspect (including the db).

James

9/20/2011 1:27:59 PM
Gravatar
Total Posts 18439

Re: Admin toolbar switched from new to old style

sorry should have noticed you posted the version previously. I will investigate it as a bug and see if I can reproduce the problem on my local machine. The reason I asked about the version is because it seems like I remember fixing something like this not long ago. If CombineCss is false it should render all the separate links for the css files but it should resolve the urls correctly even if running in a virtual directory instead of a root site.

I'll post again tomorrow and let you know after I try to reproduce this.

Best,

Joe

9/21/2011 4:05:06 AM
Gravatar
Total Posts 13

Re: Admin toolbar switched from new to old style

Joe,

I made the changes you suggested on the remote site

<add key="CombineCSS" value="true"/>
<add key="MinifyCSS" value="true"/>
<add key="CacheCssOnServer" value="true"/>
<add key="CacheCssInBrowser" value="true"/>

and now there is just the one stylesheet link (apart from the external link for jquery-ui.css), and presumably this links to the combined css file:

<link rel='stylesheet' type='text/css' href='/gowran-demo-1/csshandler.ashx?skin=styleshout-envision&amp;s=1&amp;v=2.3.6.7' />

The good news is that now the New style Admin toolbar is rendered correctly (and those missing Forum icons are also rendered), so that Web.config change appears to have got around the problem.

I re-checked by setting those keys to 'false' again, and then the rendering became incorrect again.

I presume those keys being set to 'false' for the default (out of the box) Web.config file is for the benefit of developers during site development, but as you say, should be set to 'true' before uploading to the production site.

James

9/21/2011 7:29:56 AM
Gravatar
Total Posts 18439

Re: Admin toolbar switched from new to old style

Hi James,

Those settings are set to true by default in the Web.config shipped with mojoPortal. Often people override a few of them in user.config temporarily while designing based on our Skinning Overview article, however one doesn't even need to disable them for designing any more, there is a way to do it with a cookie so it only affects the designer's browser also discussed in the article.

I tested this morning with the latest code on my local machine with a site configured in a virtual directory and it resolves those urls correctly when CombineCss is false. However, I have a vague recollection of fixing that not long ago so it may be that I fixed it after the release of mojoPortal 2.3.6.7. Getting close to anew release now so that will be fixed in the new release.

Best,

Joe

9/21/2011 7:56:10 AM
Gravatar
Total Posts 13

Re: Admin toolbar switched from new to old style

I confess I must have changed those settings to False, triggering that url issue, but it's good to know it's fixed in the next release.

Thanks Joe, I learned some new stuff during the investigation.

Thanks also to Spike.

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