2

I'm trying to open a SitePage in a Dialog. I currently arranged it for a Form of a ListItem, but when I apply the same code to a SitePage I get the following correlation error:

An exception occurred while rendering the Ribbon on the SharePoint Page.
The following exception was thrown : System.ArgumentException:
The Ribbon Tab with id: "Ribbon.Read" has not been made available for
this page or does not exist. Use Ribbon.MakeTabAvailable().

My JavaScript code:

var dialogOptions = SP.UI.$create_DialogOptions();
dialogOptions.url = '../myPage.aspx?Leistung=MyParam';
SP.UI.ModalDialog.showModalDialog(dialogOptions);

I also tryied to add the param IsDlg=1, same error. Note that if I manually open the Url in the browser it works.

2

SharePoint won't let you open certain pages with it's dialog framework.

"So the conclusion is that if you want to show a page in modal dialog taking advantage of SharePoint Modal Dialog API, then you need to make sure that the page you want to show in modal dialog is derived from Microsoft.SharePoint.WebControls.LayoutsPageBase or the page is web part page." from http://ranaictiu-technicalblog.blogspot.com/2010/06/ribbon-tab-with-id-has-not-been-made.html

http://spshell.blogspot.com/2014/11/the-ribbon-tab-with-id-ribbonread-has.html

"Ribbon.Read" has not been made available for this page or does not exist

http://blog.furuknap.net/solving-the-ribbon-tab-with-id-ribbon-read-has-not-been-made-available-for-this-page-or-does-not-exist-use-ribbon-maketabavailable

  • Thanks, as i feared... but what does the following mean You can simply fix this by changing the type of the page from wiki to webpart page? – Emaborsa Jun 9 '15 at 6:07
  • 1
    @Emaborsa: Make a Web Part Page "Site Actions > More Options > Web Part Page" in SharePoint 2010. In the Web Part Page you can add Web Parts for what you want. – IMTheNachoMan Jun 9 '15 at 13:48
  • I'm working with SP2013...can't find Site Actions > More Options > Web Part Page – Emaborsa Jun 9 '15 at 14:13
  • 1
0

Maybe below code for opening page in dialog works

var options = {
    url:'../myPage.aspx?Leistung=MyParam',
    tite: 'tite',
    allowMaximize: false,
    showClose: true,
    width: 900,
    height: 700
}

SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
  • As supposed, same error. – Emaborsa Jun 8 '15 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.