Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Web Part parameter causes server error View modes: 
User avatar
Member
Member
robert-tailor.co - 8/8/2012 9:40:21 PM
   
Web Part parameter causes server error
Hi,

I've just added a web part, and I added a value to one of the fields that has resulted in the 'Design' page showing a Server Error. The design page does not render at all now.

How can I access the Web Part value to remove the offending code if I can't access the web part properties due to the server error?

User avatar
Member
Member
robert-tailor.co - 8/8/2012 9:43:05 PM
   
RE:Web Part parameter causes server error
Additional info (related to http://devnet.kentico.com/Forums/f55/t30593/Web-Parts,-Document-Types-and-Page-Templates.aspx):

This error means that every page that contains the web part (whether it is visible or not) also gives a server error.

?

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 8/8/2012 10:09:54 PM
   
RE:Web Part parameter causes server error
Go to Site Manager > Page Templates > Your Template > Widgets> find your web part in the XML and remove it then click OK.

Be careful with the XML and make sure you just remove the the webpart node and it's children and not any other elements that will make the XML malformed.

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 8/8/2012 10:10:16 PM
   
RE:Web Part parameter causes server error
I mean Your Template > Web parts.

User avatar
Member
Member
robert-tailor.co - 8/8/2012 10:22:24 PM
   
RE:Web Part parameter causes server error
Jiveabillion wrote: I mean Your Template > Web parts.


I can see no option labelled "Web Parts" at Site Manager -> Development -> Page Templates -> [MyPageTemplate]

The tabs I have available are:

General
Sites
Scopes
Header
Documents
Versions

None of those tabs have an option to view/edit web parts.


User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 8/8/2012 10:32:53 PM
   
RE:Web Part parameter causes server error
Are you a global administrator? You are missing a few tabs. Is this a portal template?

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 8/8/2012 10:35:03 PM
   
RE:Web Part parameter causes server error
Are you sure you didn't just click "Edit Template Properties" on the template property page of a document? Those tabs you mentioned are the only ones available in that context. You've got to actually go to the site manager > development > page templates> your template to get the tab I am talking about.

User avatar
Member
Member
robert-tailor.co - 8/8/2012 11:03:58 PM
   
RE:Web Part parameter causes server error
Yep - I'm logged in as Global Administrator.

I've clicked to go into the "Site Manager".
Then "Development",
Then "Page Templates",
Then [My Custom Page Template].

And I still only see the tabs that I mentioned in my last post.

Could it be because I set up a new site from scratch using the ASPX development model rather than the Portal development model?

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 8/8/2012 11:19:55 PM
   
RE:Web Part parameter causes server error
Yes, that is why. Really, you can do pretty much everything in the portal model that you can do in ASPX. you can even use asp controls and script runat="server" in your page templates if you want. There is even a web part control called "user control" that you can use to place a user control with no parameters onto a page template in a web part zone.

User avatar
Member
Member
robert-tailor.co - 8/8/2012 11:57:03 PM
   
RE:Web Part parameter causes server error
Jiveabillion wrote: Yes, that is why. Really, you can do pretty much everything in the portal model that you can do in ASPX. you can even use asp controls and script runat="server" in your page templates if you want. There is even a web part control called "user control" that you can use to place a user control with no parameters onto a page template in a web part zone.

OK.

Is there a way I can enable all these features without having to scrap my current website and starting again?

And how can I solve my current problem of the page not rendering because of the rogue web part value?

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 8/9/2012 12:13:50 AM
   
RE:Web Part parameter causes server error
I'm sorry I can't really answer your question for sure. I've never used the aspx templates after trying it once and I've never ran into a situation that I couldn't do something I needed to do while using portal templates.

Think you can just create portal template versions of your aspx templates and just change the templates that the documents are using to your new portal templates.

I don't know where aspx template webpart data is stored. Look in the database. You can edit the xml there, but it is more difficult without a proper interface.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/9/2012 3:20:29 AM
   
RE:Web Part parameter causes server error
Hi,

My understanding is that you are using Portal engine and you added the web part using the Design tab. Or, are you using ASPX and portal engine mode mixed together?

In case you are using portal engine, please see this article.

Best regards,
Juraj Ondrus

User avatar
Member
Member
robert-tailor.co - 8/9/2012 11:52:03 PM
   
RE:Web Part parameter causes server error
kentico_jurajo wrote: Hi,

My understanding is that you are using Portal engine and you added the web part using the Design tab. Or, are you using ASPX and portal engine mode mixed together?

In case you are using portal engine, please see this article.

Best regards,
Juraj Ondrus

I setup the website using the ASPX method. I then added a page template and set it to use "ASPX + Portal".

From the document in that link you posted, I can see the check box "Display web part content", but not the option in the second screenshot - the "Web parts' tab is missing on my Page templates.

Question: If I were to setup my site from the beginning, but this time selecting an empty site using the Portal development engine, can I still develop everything as though I was using the ASPX development method?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/10/2012 1:38:49 AM
   
RE:Web Part parameter causes server error
Hi,

Yes, you can use the portal engine to develop the site. The models are basically the same - in ASPX you just have to do everything in the code files.

Anyway, regarding your issue - you are right, for mixed page templates there is no option to edit the web parts in the UI so, you will need to modify the XML directly in the DB table CMS_PageTemplate in column PageTemplateWebParts for given page template.


Best regards,
Juraj Ondrus

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 8/10/2012 1:19:00 PM
   
RE:Web Part parameter causes server error
If this isn't a crucial site (it doesn't sound like it is at the moment) Why not try this experiment.

Find your template in the page templates development section.
Temporarily change it to a portal template and save it.

Edit the XML for the web parts to remove the one that is breaking and click OK.

switch it back to a mixed mode template.

Honestly, if I were you, I would always use the portal template model. You can always throw server controls and script runat="server" tags in your template layout if you need them. The only real difference is that it stores all of that stuff in the database instead of the file system. Ultimately, if you need to throw an aspx page in there too, you have that option.