plainblack.com
Username Password
search
Bookmark and Share
View All Tickets
Gallery: js for search (datepicker?) included in album view  (#9779)
Issue

In the gallery album view, half a dozen link and script tags are added inside the body of the html. This causes validation problems. As far as I can tell they are for the datepicker in the search view. They should not be added in the album view at all.

In the search view it's added correcly between the head tags, by the way.

Example here: http://templates.unitedknowledge.nl/test-section/photo-gallery/test-gallery/album-1

You can find it just below the body opening tag. It's this bit of code:

<link href="/extras/yui/build/calendar/assets/skins/sam/calendar.css" rel="stylesheet" media="all" type="text/css" />
<script src="/extras/yui/build/yahoo/yahoo-min.js" type="text/javascript"></script>
<script src="/extras/yui/build/dom/dom-min.js" type="text/javascript"></script>
<script src="/extras/yui/build/event/event-min.js" type="text/javascript"></script>
<script src="/extras/yui/build/calendar/calendar-min.js" type="text/javascript"></script>
<script type="text/javascript">window.webguiFirstDayOfWeek = 1</script><script src="/extras/yui-webgui/build/datepicker/datepicker.js" type="text/javascript"></script>
<script type="text/javascript">window.webguiFirstDayOfWeek = 1</script><script type="text/javascript">window.webguiFirstDayOfWeek = 1</script><script type="text/javascript">window.webguiFirstDayOfWeek = 1</script>


Solution Summary
Comments
perlDreamer
0
2/21/2009 7:53 pm
These script tags come from Form controls for Date and DateTime.  They are optional template variables for the search controls and are not displayed in the default template.

GalleryAlbum view, getTemplateVars, gallery->appendTemplateVarsSearchForm.

I think if the variable prep was moved into prepareView, that it might shift them into the head block.
perlDreamer
0
2/21/2009 9:34 pm
This problem will exist in any place that makes calls to Form elements in its view method.
perlDreamer
0
2/21/2009 9:36 pm
Fixed in 7.6.13.   Please keep your eyes open for this bug occurring in other areas of WebGUI, and open separate tickets for each one.
Resolved by perlDreamer
rogier
0
2/22/2009 2:51 am
Will do. Thank you.
roryzweistra
0
3/5/2009 3:02 am
I'm running 7.6.13 and I am seeing something similar, I just don't see that many of them.

<script type="text/javascript">window.webguiFirstDayOfWeek = '0'</script><script src="/extras/yui-webgui/build/datepicker/datepicker.js" type="text/javascript"></script>
<script type="text/javascript">window.webguiFirstDayOfWeek = '0'</script><script type="text/javascript">window.webguiFirstDayOfWeek = '0'</script><script type="text/javascript">window.webguiFirstDayOfWeek = '0'</script>
roryzweistra
0
3/5/2009 3:08 am
Here's a link to be complete :)

http://www.rozenboomlaan.nl/home/verbouwing-rozenboomlaan/test
rogier
0
3/5/2009 3:23 am
When I look at the source of that page, those script tags are correctly in the head tags. There have been reports of a similar bug happening only when logged in as an admin (http://www.plainblack.com/bugs/tracker/9404). Could you check if that is the case here? Thanks.
Details
Ticket Status Closed  
Rating0.0 
Submitted Byrogier 
Date Submitted2009-02-21 
Assigned To unassigned  
Date Assigned2010-09-02 
Assigned By 
Severity Critical (mostly not working)  
What's the bug in? WebGUI Beta  
WebGUI / WRE Version 7.6.10  
URLbugs/tracker/9779
Keywords
Ticket History
2/22/2009
2:51 AM
Closed rogier
2/21/2009
9:36 PM
Resolved perlDreamer
2/21/2009
4:59 AM
Ticket created rogier
© 2010 Plain Black Corporation | All Rights Reserved