Hi AriK!
Make sure that your pagetemplates inherits from base class EPiServer.TemplatePage.
/johan
Thanks Johan
the pages does inherits from EPiServer.TemplatePage (the one with the rightclickmenu and the one that does not have the rightclickmenu)
any idea what else can be the reason ?
Arik
Hi AriK!
Two more things to verify:
1. Does your page template have the attribute RightClickMenu?
Example:
[RightClickMenu(Disabled=true)]
public partial class Page : TemplatePage
{
2. Do you get any javascript-errors on the page?
Thanks Fredrick
There are no JS error on those pages and we don't have any RightClickMenu attribute anywhere in our page templates.
Arik
Ok.
What's your EPiServer version? What's your .Net framework version? When you say the RCA menu exists on some pages but not on others, are they different pagetypes or the same? Can you get the RCA on one page then, but not now?
You may also include a trace output of HttpContext.Current.User.Identity.Name on the pages that doesnt show up the contextmenu to see if the user is considered "logged in" or not.
/ johan
We are using CMS 5 SP1 with dot net framework 3
They are diffrent pagetypes. , on some of the page types the RCS does work and on some pagetypes it doesn't
Thanks
arik
Could you post some examples on pagetypes where it works and where it's not working?
And some trace outputs as Johan describes it...
Hi
i've checked the HttpContext.Current.User.Identity.Name anf found that the user is considered loged in and authenticate on all pages.
Fredrick - what exactly should i post as an example ?
Thanks
arik
If you look at the pages htmlsource for pagetypes where the menu doesnt work, do you see the contextmenu javascript there?
It would look something like this:
var menu1 = new ContextMenu();
if(!isEditMode())
menu1.AddMenuItem('New',null,'window.open(\'http://world.episerver.com/epiUI/edit/Default.aspx?id=23384&mode=createpage\',\'_self\')','true','/App_Themes/Default/Images/Tools/NewPage.gif',null);
if(!isEditMode())
menu1.AddMenuItem('Quick-edit',null,'window.open(\'http://world.episerver.com/epiUI/edit/Default.aspx?id=23384&epslanguage=en&mode=simpleeditmode\',\'_self\')','true','/App_Themes/Default/Images/Tools/QuickEdit.gif',null);
If you do, then its probably some javascript included on those pagetypes that interfere with the contextmenuscript.
If you *dont* see these scripts, then something on the serverside for said pagetypes "prevents" (or overrides) the scripts from being rendered properly.
In either way, I think that the only way to find out is to start comment out piece by piece of the pagetypes code and/or markup until the point where the contextmenu starts to appear. There is no known (or atleast not to me) "simple" situation besides whats been discussed above that causes this.
/johan
Could it be that your pagetypes uses different master pages and that the failing ones have a master page without the ASP.NET form (<form runat="server">)?
/Pontus
Hi
What can be the reason that the RightClickMenu does not exists on some pages but does exists on other pages ?
Thanks
arik