• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

TKatch
#1 Posted : Monday, August 17, 2015 12:20:27 PM(UTC)
TKatch

Rank: Member

Joined: 1/23/2013(UTC)
Posts: 267
Location: Joliet, IL

Thanks: 64 times
So I'm trying to change the Contact Us form to show up at the top of the page instead of the bottom. So how would I go about this in the new 2015 architecture? I tried first copying the Contactus.aspx and ContactUs.aspx.vb files to my theme folder called "Pages" so I can make edits. That immediately crashed the page with this error:

Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The file '/BVModules/Themes/Kataaro/pages/BVModules/Controls/ManualBreadCrumbTrail.ascx' does not exist.
Source Error:
Line 2: CodeFile="ContactUs.aspx.vb" Inherits="Contact" Title="Contact Us" ValidateRequest="false" %>
Line 3:
Line 4: <%@ Register Src="BVModules/Controls/ManualBreadCrumbTrail.ascx" TagName="ManualBreadCrumbTrail"
Line 5: TagPrefix="uc2" %>
Line 6: <%@ Register Src="~/BVModules/Controls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc1" %>

How to make page changes with new 2015 Architecture
Aaron
#2 Posted : Monday, August 17, 2015 1:50:37 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
It's a pathing problem. Since the ContactUs page is now located in /BVModules/Themes/Kataaro/Pages and the path to the ManualBreadCrumbTrail control is relative (i.e. BVModules/Controls/ManualBreadCrumbTrail.ascx), the resulting path is invalid (i.e. /BVModules/Themes/Kataaro/pages/BVModules/Controls/ManualBreadCrumbTrail.ascx). The easy fix is to put a "~/" in front of the path like this:

Code:
<%@ Register Src="~/BVModules/Controls/ManualBreadCrumbTrail.ascx" TagName="ManualBreadCrumbTrail" TagPrefix="uc2" %>
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
TKatch
#3 Posted : Monday, August 17, 2015 4:04:51 PM(UTC)
TKatch

Rank: Member

Joined: 1/23/2013(UTC)
Posts: 267
Location: Joliet, IL

Thanks: 64 times
Then would it also fix it to bring the breadcrumbtrail files into the theme folder? Is that a better fix or does it not matter?
Aaron
#4 Posted : Monday, August 17, 2015 4:52:33 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Originally Posted by: TKatch Go to Quoted Post
Then would it also fix it to bring the breadcrumbtrail files into the theme folder? Is that a better fix or does it not matter?


If you created BVModules/Controls/ folders under the Pages folder, yes, but that doesn't make any sense. Also, you only want to copy things into the theme that you're overriding. Since you're not changing the breadcrumb control, it should not be copied into the theme.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
 1 user thanked Aaron for this useful post.
TKatch
#5 Posted : Monday, August 17, 2015 5:25:59 PM(UTC)
TKatch

Rank: Member

Joined: 1/23/2013(UTC)
Posts: 267
Location: Joliet, IL

Thanks: 64 times
I guess I also needed to not put the files in the "pages". It worked when adding to the "themes" folder since it needed to reference the service.master files as well. Working now. Thanks.
TKatch
#6 Posted : Tuesday, August 18, 2015 11:28:14 AM(UTC)
TKatch

Rank: Member

Joined: 1/23/2013(UTC)
Posts: 267
Location: Joliet, IL

Thanks: 64 times
So I've copied the the Contact Us files to my Kataaro theme folder and the page is functional. But no matter what changes I make to the page within the themes folder, nothing takes affect. I've changed the button image and I've also tried getting the form to the top of the page, but nothing happens.
Aaron
#7 Posted : Tuesday, August 18, 2015 1:33:06 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Tom,

You may need to restart your site/application for the changes to be picked up. We've seen that happen when a page or control was previously not overrridden. I think what happens is that ASP.NET compiles the page using the original page and does not see the override until it recompiles (which requires an application restart).
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Aaron
#8 Posted : Tuesday, August 18, 2015 1:34:39 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Also, if you haven't done so, you should change the class name of your duplicated page so that it's different/unique from the page that you duplicated. This change will need to be made in the @Page directive at the top of the .aspx and the .vb code-behind file.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
TKatch
#9 Posted : Tuesday, August 18, 2015 3:47:14 PM(UTC)
TKatch

Rank: Member

Joined: 1/23/2013(UTC)
Posts: 267
Location: Joliet, IL

Thanks: 64 times
So I need to change this code?

<%@ Page Language="VB" MasterPageFile="~/BVModules/Themes/Bvc5/Service.master" AutoEventWireup="false"
CodeFile="ContactUs.aspx.vb" Inherits="Contact" Title="Contact Us" ValidateRequest="false" %>
Aaron
#10 Posted : Tuesday, August 18, 2015 4:32:11 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
The "Inherits" attribute is the one that needs to change to match the new class name that you set in the code-behind file (i.e. ContactUs.aspx.vb). You should always ensure unique class names. That said, usually it doesn't cause an issue if you don't bother. Given that you're having problems, though, this would be something else to try if restarting the application doesn't resolve your issue.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
 1 user thanked Aaron for this useful post.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012