Loading...

All project content is available for reading, but you need to be a member of the project for Subversion checkout of source code, or to create/modify any information.
Login if you are a member. Apply here to request membership (open to all).

Ticket #49 (new defect)

Opened 10 years ago

Last modified 10 years ago

Javascript error(Object required)

Reported by: tore.gjerdrum@… Owned by: david.wahl@…
Priority: blocker Component: PageContainer
Keywords: Cc: steve@…

Description

Hi.

I am trying to use the Logica Page Container, but when I drag pages from the Pagetree, I get an Javascript error(Object required). It seem like the page never leaves the Pagetree and comes over to the EdiPanel.aspx where the property is. Is there anything I need to enable to get this to work?

I have downloaded the code from EPiCode and compiled it into my project, and added the property to a pagetemplate. I have also added the parameters in Web.Config(appsettings). Is there anything more I need to do?

BR,
Tore Gjerdrum

Attachments

error.jpg (36.8 KB) - added by tore.gjerdrum@… 10 years ago.

Change History

comment:1 in reply to: ↑ description ; follow-up: ↓ 3 Changed 10 years ago by david.wahl@…

Hi! Please make sure that the "PageContainerServiceUrl" setting in Web.Config is a valid address. You can easily check this by opening the URL in a browser and adding PID as the pageid parameter. ("http://SERVER/SERVICE-DIRECTORY/PageContainerService.aspx?pid=3").

Changed 10 years ago by tore.gjerdrum@…

comment:2 Changed 10 years ago by tore.gjerdrum@…

Hi.

When i did that, I got another errormessage. Please see attached file error.jpg

Tore

comment:3 in reply to: ↑ 1 Changed 10 years ago by grady.dycus@…

Replying to david.wahl@wmdata.no:

Hi! Please make sure that the "PageContainerServiceUrl" setting in Web.Config is a valid address. You can easily check this by opening the URL in a browser and adding PID as the pageid parameter. ("http://SERVER/SERVICE-DIRECTORY/PageContainerService.aspx?pid=3").

I am using the latest version of EPiServer (SP1) and I am getting the same errors. One problem the Page directive is missing Inherits="EPiServer.TemplatePage" that is why there is an error about the AccessDenied.

Another problem is int.Parse(id) because when the edit page is loaded the querystring looks like this...

pid=4432677846601036,2186060934354616769,1914974502858268908,8935899433953384154

which of course can't be parsed into an int.

I was also getting a context menu error and the following made that error go away...
protected override void OnPreInit(EventArgs e)
{

ContextMenu.IsMenuEnabled = false;
base.OnPreInit(e);

}

But when I make sure to only create the xml when the id in the int.Parse(id) is a valid int, there is always an item in the grid with "undefined" for values.

I'm working through it right now, but if you have any suggestions, I would appreciate it.

Thanks!

comment:4 follow-up: ↓ 5 Changed 10 years ago by steve@…

  • Cc steve@… added

I have fixed the inherit statement in changeset:460. Now inherits from SimplePage.

Testing with http://localhost/Logica/PageContainer/PageContainerService.aspx?pid=3,4,22,8,5 works too (if not logged in, I'm redirected to the login page.)

The javascript works for me, in IE7 and Firefox 2.0.014.

Those id's are looking strange indeed. I wonder how you got those large numbers. If you change the property type from PageContainerProperty to XHtmlString, check your page again, and look at the html source. What does the links look like?

comment:5 in reply to: ↑ 4 Changed 10 years ago by tore.gjerdrum@…

Hi.

It works fine for me now. I am not having problems with the id`s, but where is the uiUrl defined? When i click the edit button in edit mode i get a popup with the wrong uiUrl(http://www.mysite.no/ui/edit/Default.aspx?id=289&mode=simpleeditmode). My uiUrl is http://www.mysite.no/SiteUI/edit/Default.aspx?id=289&mode=simpleeditmode. Can I change this anywhere?

BR,
Tore

Replying to steve@bvnetwork.no:

I have fixed the inherit statement in changeset:460. Now inherits from SimplePage.

Testing with http://localhost/Logica/PageContainer/PageContainerService.aspx?pid=3,4,22,8,5 works too (if not logged in, I'm redirected to the login page.)

The javascript works for me, in IE7 and Firefox 2.0.014.

Those id's are looking strange indeed. I wonder how you got those large numbers. If you change the property type from PageContainerProperty to XHtmlString, check your page again, and look at the html source. What does the links look like?

comment:6 Changed 10 years ago by steve@…

It seems like the edit url is hardcoded in the (/browser/Logica.PageContainer/5.x/Logica/PageContainer/PageContainer.js#L207 PageContainer.js file).

If you want to have a shot at it, I'd start by adding the ui url to the init method in PageContainer.cs and read that from the js file.

I have fixed another bug too - in changeset:461, that made the buttons disappear if you did not explicitly add something to the PageContainerButtons key in web.config.

Note: See HelpUser/Tickets for help on using tickets.