strange error from time to time during the start

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
9/15/2012 6:31:42 PM
Gravatar
Total Posts 70

strange error from time to time during the start

Hi All,

from time to time, actually, maybe after the layout.master adjustment, I been faced up to the strange error during the site start:

The base class includes the field 'divLeft', but its type (mojoPortal.Web.UI.LayoutPanel) is not compatible with the type of control (System.Web.UI.WebControls.Panel)

Could you pleas give some advice how it is possible to fix?

p.s.: no errors during compilation

Many thanx, Igor.

9/16/2012 7:27:00 AM
Gravatar
Total Posts 70

Re: strange error from time to time during the start

Well.. Maybe, I've found the reason..

First of all, I've pulled all new sources from HG, recompile them.

After that I've rewritten all my development sources with new one, recreate all my custom projects.

Rebuild, voila - no problems, my new skin with new layout.master (NivoSlider implemented etc) available, all perfect..

And, maybe, the reason was in fact what I've added folder with my new skin into the mojoPortal.Web project.. Without that all solution been recompiled and run like a charm..

Thanks, sorry for boring!

Warm regards, Igor

9/16/2012 1:10:45 PM
Gravatar
Total Posts 18439

Re: strange error from time to time during the start

Hi Igor,

This problem can happen in Visual Studio.

Here is what/why it happens:

I've updated the skins we ship in layout.master from 

from
<asp:Panel id="divLeft" runat="server"
to
<portal:LayoutPanel id="divLeft" runat="server"

but in the code behind /App_MasterPages/layout.master.cs I kept the control declaration as <asp:Panel so it would not break existing skins

then if you open in VS a layout.master file that does have this:

<portal:LayoutPanel id="divLeft" runat="server"

then VS updates the control declarations in /App_MasterPages/layout.master.designer.cs to <portal:LayoutPanel

so then when you try to use a skin that still has <asp:Panel id="divLeft" it causes this error

I can solve this problem, I will remove the layout.master.designer.cs file and move only the needed control declarations into layout.master.cs, that way VS will not be able to make changes that cause this error. I will push this change to the default branch of our repository in a few days, I have to wait because I have some other unfinished work in my branch that I'm not ready to push to the default branch.

But, in the meantime, anytime you get that error you can solve it be reverting the file /App_MasterPages/layout.designer.cs then rebuild the mojoPortal.Web project

Thanks,

Joe

9/16/2012 3:07:14 PM
Gravatar
Total Posts 70

Re: strange error from time to time during the start

Many thanks, Joe!

Regards, Igor.

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