Answered by:
Gantt View not displaying with Custom Master page

Question
-
We have created a custom master page based on the Starter master page (from Randy Drisgill), with some other things from the Nightandday master added in. We have found that the Gantt views do not display with our custom master. Has anyone else encountered this and found a solution?Friday, July 23, 2010 2:31 PM
Answers
-
for those who have removed #s4-workspace from their masterpages, here is a quick-and-dirty jquery fix
if ($("#aspnetForm").attr('action').toLowerCase().indexOf('gant') >= 0) $("#s4-bodyContainer").wrap("<div id=\"s4-workspace\" />");
...might need some .css massaging for gant-page though.- Marked as answer by Pratik Vyas Monday, August 5, 2013 4:27 PM
Monday, October 31, 2011 3:01 PM -
Hi ftduarte,
We also builded a new master page, but it is based on the v4.master. We added some custom controls, removed a few (set them to invisible) and moved some others to another place. We also included a custom CSS file to override the SharePoint CSS.
One of the things we wanted to change was the scroll bar which in standard SP 2010 only scrolls the part below the ribbon. We wanted it to scroll the whole page (like amyliz). So we also removed the s4-workspace ID from the DIV and it worked.
A view days ago we saw that the Gantt View is not displayed. So I searched around and found this post and added the s4-workspace again to our master page. So the Gantt View was back but also the stupid scroll bar...
So I cannot remove the s4-workspace (we need the Gant View) but I also don't want the scroll bar. To get both I just tried to change the style of the s4-workspace with my CSS and it seems to work.- Proposed as answer by Marco Caruso Monday, January 14, 2013 3:38 PM
- Marked as answer by Pratik Vyas Monday, August 5, 2013 4:27 PM
Tuesday, September 6, 2011 2:40 PM
All replies
-
The most likely scenario is that Randy has moved the part that renders that control into the "Hidden" ASP Panel at the bottom of the master page. I would start there - browse to the bottom of the master page and take a look at the items in the HIDDEN panel. I doubt anything has been "deleted".
Friday, July 23, 2010 3:39 PM -
Actually, Randy's master, as is, works. We needed to have the Ribbon scroll with the page, and so followed directions given by Jonathan Kern in this post .
One step said to "2) Remove or change the Workspace element’s ID to make the ECMAScript code abort early during window resizes and Ribbon minimize/maximize events. You can leave the element, but just change or remove the ID." so we renamed our s4-workspace div to be s4-workspace-nofixedribbon.
After doing some troubleshooting and adding various tweaks we had made to Randy's master one by one until it broke, we narrowed it down to this. The Gantt view apparently depends on the s4-workspace being present.
So, if anyone can help me have my cake and eat it too... i.e. have the ribbon scroll and also have Gantt charts work... please let me know.
Monday, July 26, 2010 6:34 PM -
hi.
have you found a solution for this?
I have a custom master with s4-workspace div id and no gantt view :(
"The more difficult something became, the more rewardant it was in the end"Wednesday, May 25, 2011 4:37 PM -
figured it out!
missing div id
s4-bodyContainer
"The more difficult something became, the more rewardant it was in the end"Wednesday, May 25, 2011 5:13 PM -
hi,
"missing div id s4-bodyContainer"
i have the same problem! could you explain what you mean
Saturday, June 18, 2011 10:04 PM -
you need to add a wrapper div
<div id="s4-bodyContainer">
content area goes here
</div>
"The more difficult something became, the more rewardant it was in the end"Tuesday, July 26, 2011 3:11 PM -
Hi,
I was also facing this problem... but with changing the css I could solve it.
You just need to override the "body #s4-workspace" from the corev4.css with your own css file.
body #s4-workspace
{
overflow:visible !important;
}Best regards,
Anna- Proposed as answer by Anna_0815 Monday, September 5, 2011 1:01 PM
- Edited by Anna_0815 Monday, September 5, 2011 1:05 PM
- Unproposed as answer by Hemendra Agrawal Friday, March 22, 2013 10:31 AM
Monday, September 5, 2011 1:01 PM -
Hi Anna.
Thank you for your feedback.
I don't know what your environment is like, but we have developed a completly new master page from ground up, meaning no more divs or ids from default sharepoint master page.
Also, from what I have understood, there are a few elements (certain ids such as s4-workspace and s4-bodycontainer) that sharepoint uses to calculate positioning and where to add stuff. If these elements are not included on a master page, that master page won't work. Using the gantt views example, without a <div id="s4-bodyContainer"> on our master page, the gantt chart doesn't even render, so the html doesn't get included in the page, I assume because javascript looks for that element and places the chart's html inside it.
If I could guess, you seem to have a master page that includes that element, but the contents didn't show until you added extra css styles. So, the element is there, and the html from the chart is being rendered. In your case, it should be just a styling issue.
"The more difficult something became, the more rewardant it was in the end"
http://ftduarte.blogspot.comMonday, September 5, 2011 2:00 PM -
Hi ftduarte,
We also builded a new master page, but it is based on the v4.master. We added some custom controls, removed a few (set them to invisible) and moved some others to another place. We also included a custom CSS file to override the SharePoint CSS.
One of the things we wanted to change was the scroll bar which in standard SP 2010 only scrolls the part below the ribbon. We wanted it to scroll the whole page (like amyliz). So we also removed the s4-workspace ID from the DIV and it worked.
A view days ago we saw that the Gantt View is not displayed. So I searched around and found this post and added the s4-workspace again to our master page. So the Gantt View was back but also the stupid scroll bar...
So I cannot remove the s4-workspace (we need the Gant View) but I also don't want the scroll bar. To get both I just tried to change the style of the s4-workspace with my CSS and it seems to work.- Proposed as answer by Marco Caruso Monday, January 14, 2013 3:38 PM
- Marked as answer by Pratik Vyas Monday, August 5, 2013 4:27 PM
Tuesday, September 6, 2011 2:40 PM -
for those who have removed #s4-workspace from their masterpages, here is a quick-and-dirty jquery fix
if ($("#aspnetForm").attr('action').toLowerCase().indexOf('gant') >= 0) $("#s4-bodyContainer").wrap("<div id=\"s4-workspace\" />");
...might need some .css massaging for gant-page though.- Marked as answer by Pratik Vyas Monday, August 5, 2013 4:27 PM
Monday, October 31, 2011 3:01 PM -
Our master page consultant gave use a master without the s4-workspace div id. Put that in and the Gantt view works again.Tuesday, March 19, 2013 6:48 PM
-
Hi,
I had faced the similar issue, so i came up with a solution, which is defined in my blog. It is a crude solution, but worked wonders for me !!
http://soumyarohithrao.wordpress.com/2013/06/19/gantt-view-issue-with-custom-master-page/
Thursday, June 20, 2013 7:34 AM -
This could also be a problem with the CSS framework that we use to create the master page. With Bootstrap, there is a border-box style that can cause the chart from not displaying.
* { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
}
You can override that style to content-box instead. The challenge is to apply the style only to that element, so it does not affect other elements on the layout.
div[style$="border: 1px solid rgb(171, 171, 171);"] { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; }
More detail can be found here: http://www.ozkary.com/2017/04/sharepoint-gantt-chart-hidden-bootstrap-master-page.html
Monday, May 15, 2017 1:28 PM