Skip to main content Help Control Panel

 

support «   Soupçons de bogues «  

YACS.JS not included correctly in 7.10 [Integrated]

Angeli Axel -- on Nov. 25 2007

You get a Javascript error on pages where a javascript tree is used. This is caused by a wrong inclusion of yacs.js (Il y a un JS erreur en utilisant des aborescenses etc.) causé par une mauvaise inclusion de yacs.js dans GLOBAL.PHP.

WorkflowSupport request
StatusSolution has been fully integrated
OwnerAngeli Axel
Progress100%

Solution:

The error happens in shared/GLOBAL.PHP.

When activating the AJAX client library, the path to YACS.JS is appended to the page_footer instead to the page_header. This causes often a Javascript error.

To repair this please change the code in line 1138 of shared/global.php

// activate AJAX client library if(file_exists($context['path_to_root'].'shared/yacs.js'))

// [INSERT] $context['page_header'] .= ''."\n";// [/INSERT]

// [DELETE]// $context['page_footer'] .= ''."\n";// [/DELETE]

Files

Yacs.png - 58,534 bytes, 206 downloads
edited by Oxalagu on Nov. 27 2007 · details

Comments


Bernard Paquesfrom nearby-an-airport
Associate, 8408 posts

on Nov. 26 2007


Ceci n'est pas un bug, mais une fonction normale, qui suit les recommendations du groupe de performance de Yahoo! (repousser le chargement des scripts le plus tard posible dans la page web pour améliorer les temps de réponse). S'il y a une erreur javascript, ou une autre erreur XHTML, elle doit être résolue séparément. Le template choisi passe-t-il les tests de validation du w3c ?

Angeli Axel
46 posts

on Nov. 27 2007


Merci de ta reponse.

C'est une bonne indication; il me donne une direction pourquoi Yahoo à ainsi beaucoup de problème avec les sites ... mais ceci nous aide pas. Le fait c'est que mettre le footer ne fonctionne pas. Peutetre le problème c'est aussi que le footer n'est pas correctement inclus dans la page, je ne sais pas pourquoi. Si j'ajoute le script au footer, il n'apparait pas dans le HTML.

En bas la page comme elle est générée avec:

  $context['page_footer'] .=  .....

On ne trouve nulle part le yacs.js ..... on includant dans le Header, tous fonctionne impeccablement ....

generellement je ne sais pas suivre le raisonment de Yahoo à mettre le <script > dans le footer .... c'est peutetre bien pour les robots de recherche ... mais pas pour le rendering .... 

Slts. Axel

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <base href="http://php.localhost/yacs7/collections/configure.php"/>
 <link rel="stylesheet" href="/yacs7/skins/logosworld_digital/logosworld_digital.css" type="text/css" media="all" />
 <link rel="stylesheet" href="/yacs7/skins/logosworld_digital/logosworld_colors.css" type="text/css" media="all" />
 <link rel="shortcut icon" href="/yacs7/skins/logosworld_digital/squares.ico" type="image/x-icon" />
 <link rel="icon" href="/yacs7/skins/logosworld_digital/squares.ico" type="image/x-icon" />
 <link rel="stylesheet" href="/yacs7/skins/logosworld_digital/nicetitle.css" type="text/css" media="all" />
 <script type="text/javascript" src="/yacs7/included/browser/nicetitle.js"></script>
 
 <title>The configuration panel for collections - php.localhost</title>
 <link rel="help" href="/yacs7/help.php" type="text/html" />
 <meta name="description" content="YACS Community" />
 <meta name="revisit-after" content="7 days" />
 <meta name="MSSmartTagsPreventParsing" content="TRUE" />
 <meta http-equiv="imagetoolbar" content="no" />
 <meta name="robots" content="index,follow" />
 <script type="text/javascript">// <![CDATA[
  var url_to_root = 'http://php.localhost/yacs7/';
  var url_to_skin = 'http://php.localhost/yacs7/skins/logosworld_digital/'
 // ]]></script>
 <script type="text/javascript" src="/yacs7/included/browser/minify.php"></script>
 
 <link rel="stylesheet" type="text/css" media="all" href="/yacs7/included/jscalendar/skins/aqua/theme.css" title="jsCalendar - Aqua" />
 <link rel="alternate stylesheet" type="text/css" media="all" href="/yacs7/included/jscalendar/calendar-system.css" title="jsCalendar - system" />
</head>
<body id="collections" class="extra">
<p class="away"><a href="#main_panel" accesskey="2">Skip to main content</a> <a href="/yacs7/help.php" accesskey="0">Help</a> <a href="/yacs7/control/" accesskey="9">Control Panel</a> </p>
<div id="header_panel">
<p id="header_title"><a href="/yacs7/" title="Return to front page" accesskey="1"><span>php.localhost</span></a></p>
<div id="tabs"><ul>
<li id="tab_home"><span><a href="/yacs7/"><span>Home</span></a></span></li>
<li id="tab_section_1"><span><a href="/yacs7/sections/view.php?id=1&amp;action=channels"><span>Channels</span></a></span></li>
<li id="tab_section_19"><span><a href="/yacs7/sections/view.php?id=19&amp;action=composite-news"><span>Composite News</span></a></span></li>
<li id="tab_section_10"><span><a href="/yacs7/sections/view.php?id=10&amp;action=files"><span>Files</span></a></span></li>
<li id="tab_section_11"><span><a href="/yacs7/sections/view.php?id=11&amp;action=my-blog"><span>My blog</span></a></span></li>
<li id="tab_section_12"><span><a href="/yacs7/sections/view.php?id=12&amp;action=my-jive-discussion-board"><span>My jive discussion board</span></a></span></li>
</ul></div>
</div>
<div id="wrapper">
<div id="main_panel">
<h1>The configuration panel for collections</h1>
<p id="page_menu"><a href="/yacs7/collections/"><span>All collections</span></a></p>
<form method="post" action="/yacs7/collections/configure.php" id="main_form"><div><p>Below is the list of shared directories of files.</p>
<h2>Collections</h2><div class="folder_box"><a class="folder_header" onclick="javascript:Yacs.toggle_folder(this, '/yacs7/skins/logosworld_digital/icons/folder_extend.gif', '/yacs7/skins/logosworld_digital/icons/folder_pack.gif'); return false;"><img src="/yacs7/skins/logosworld_digital/icons/folder_extend.gif" alt="Click to fold or pack" title="Click to fold or pack" /> Collection: My Collection</a><div class="folder_body" style="display: none"><table class="form">
<tr class="odd"><td>Collection nick name</td><td><input type="text" name="collection_names[my_collection]" size="32" value="my_collection" maxlength="32" /><br style="clear: both;" /><span class="tiny">Delete to suppress</span></td></tr>
<tr class="even"><td>Visibility</td><td><input type="radio" name="collection_visibilities[my_collection]" value="Y" checked="checked" /> Anyone may browse this collection<br /><input type="radio" name="collection_visibilities[my_collection]" value="R" /> Restricted to logged members<br /><input type="radio" name="collection_visibilities[my_collection]" value="N" /> Restricted to associates</td></tr>
<tr class="odd"><td>Label</td><td><input type="text" name="collection_titles[my_collection]" size="45" value="My Collection" maxlength="255" /><br style="clear: both;" /><span class="tiny">Please provide a meaningful title.</span></td></tr>
<tr class="even"><td>Path prefix</td><td><input type="text" name="collection_paths[my_collection]" size="45" value="F:\BLUEBOOK\myPubs\SAPTIPS\Finals" maxlength="255" /><br style="clear: both;" /><span class="tiny">Local access to files; YACS installation directory is at "F:/PHP/Yacs710/yacs/"</span></td></tr>
<tr class="odd"><td>URL prefix</td><td><input type="text" name="collection_urls[my_collection]" size="45" value="http://php.localhost" maxlength="255" /><br style="clear: both;" /><span class="tiny">The ftp:// or http:// address used to access the collection</span></td></tr>
<tr class="even"><td>Introduction</td><td><textarea name="collection_introductions[my_collection]" cols="40" rows="2">Public files to download</textarea><br style="clear: both;" /><span class="tiny">To be used at the front page and on the collections index page</span></td></tr>
<tr class="odd"><td>Description</td><td><textarea name="collection_descriptions[my_collection]" cols="40" rows="3">Click on file names to transfer them to your workstation, or to start a Video-on-demand session.</textarea><br style="clear: both;" /><span class="tiny">To be inserted on the index page of this collection</span></td></tr>
<tr class="even"><td>Prefix</td><td><textarea name="collection_prefixes[my_collection]" cols="40" rows="2"></textarea><br style="clear: both;" /><span class="tiny">Inserted on top of pages for this collection</span></td></tr>
<tr class="odd"><td>Suffix</td><td><textarea name="collection_suffixes[my_collection]" cols="40" rows="2"></textarea><br style="clear: both;" /><span class="tiny">Inserted at bottom of pages for this collection</span></td></tr>
</table>
</div></div>
<div class="folder_box"><a class="folder_header" onclick="javascript:Yacs.toggle_folder(this, '/yacs7/skins/logosworld_digital/icons/folder_extend.gif', '/yacs7/skins/logosworld_digital/icons/folder_pack.gif'); return false;"><img src="/yacs7/skins/logosworld_digital/icons/folder_extend.gif" alt="Click to fold or pack" title="Click to fold or pack" /> Collection: Whitepapers</a><div class="folder_body" style="display: none"><table class="form">
<tr class="odd"><td>Collection nick name</td><td><input type="text" name="collection_names[Whitepapers]" size="32" value="Whitepapers" maxlength="32" /><br style="clear: both;" /><span class="tiny">Delete to suppress</span></td></tr>
<tr class="even"><td>Visibility</td><td><input type="radio" name="collection_visibilities[Whitepapers]" value="Y" checked="checked" /> Anyone may browse this collection<br /><input type="radio" name="collection_visibilities[Whitepapers]" value="R" /> Restricted to logged members<br /><input type="radio" name="collection_visibilities[Whitepapers]" value="N" /> Restricted to associates</td></tr>
<tr class="odd"><td>Label</td><td><input type="text" name="collection_titles[Whitepapers]" size="45" value="Whitepapers" maxlength="255" /><br style="clear: both;" /><span class="tiny">Please provide a meaningful title.</span></td></tr>
<tr class="even"><td>Path prefix</td><td><input type="text" name="collection_paths[Whitepapers]" size="45" value="F:\BLUEBOOK\myPubs\SAPTIPS\Finals\public" maxlength="255" /><br style="clear: both;" /><span class="tiny">Local access to files; YACS installation directory is at "F:/PHP/Yacs710/yacs/"</span></td></tr>
<tr class="odd"><td>URL prefix</td><td><input type="text" name="collection_urls[Whitepapers]" size="45" value="/docs/saptips/public" maxlength="255" /><br style="clear: both;" /><span class="tiny">The ftp:// or http:// address used to access the collection</span></td></tr>
<tr class="even"><td>Introduction</td><td><textarea name="collection_introductions[Whitepapers]" cols="40" rows="2">These are the whitepapers that have been published for SAPTIPS.COM.</textarea><br style="clear: both;" /><span class="tiny">To be used at the front page and on the collections index page</span></td></tr>
<tr class="odd"><td>Description</td><td><textarea name="collection_descriptions[Whitepapers]" cols="40" rows="3"></textarea><br style="clear: both;" /><span class="tiny">To be inserted on the index page of this collection</span></td></tr>
<tr class="even"><td>Prefix</td><td><textarea name="collection_prefixes[Whitepapers]" cols="40" rows="2">(c)2003-2008 SAPTIPS.COM</textarea><br style="clear: both;" /><span class="tiny">Inserted on top of pages for this collection</span></td></tr>
<tr class="odd"><td>Suffix</td><td><textarea name="collection_suffixes[Whitepapers]" cols="40" rows="2"></textarea><br style="clear: both;" /><span class="tiny">Inserted at bottom of pages for this collection</span></td></tr>
</table>
</div></div>
<div class="folder_box"><a class="folder_header" onclick="javascript:Yacs.toggle_folder(this, '/yacs7/skins/logosworld_digital/icons/folder_extend.gif', '/yacs7/skins/logosworld_digital/icons/folder_pack.gif'); return false;"><img src="/yacs7/skins/logosworld_digital/icons/folder_extend.gif" alt="Click to fold or pack" title="Click to fold or pack" /> Add a new collection</a><div class="folder_body" style="display: none"><table class="form">
<tr class="odd"><td>Collection nick name</td><td><input type="text" name="collection_names[]" size="32" maxlength="32" /><br style="clear: both;" /><span class="tiny">Use a short nick name</span></td></tr>
<tr class="even"><td>Visibility</td><td><input type="radio" name="collection_visibilities[]" value="Y" checked="checked" /> Anyone may browse this collection<br /><input type="radio" name="collection_visibilities[]" value="R" /> Restricted to logged members<br /><input type="radio" name="collection_visibilities[]" value="N" /> Restricted to associates</td></tr>
<tr class="odd"><td>Label</td><td><input type="text" name="collection_titles[]" size="45" maxlength="255" /><br style="clear: both;" /><span class="tiny">Please provide a meaningful title.</span></td></tr>
<tr class="even"><td>Path prefix</td><td><input type="text" name="collection_paths[]" size="45" maxlength="255" /><br style="clear: both;" /><span class="tiny">Local access to files; YACS installation directory is at "F:/PHP/Yacs710/yacs/"</span></td></tr>
<tr class="odd"><td>URL prefix</td><td><input type="text" name="collection_urls[]" size="45" maxlength="255" /><br style="clear: both;" /><span class="tiny">The ftp:// or http:// address used to access the collection</span></td></tr>
<tr class="even"><td>Introduction</td><td><textarea name="collection_introductions[]" cols="40" rows="2"></textarea><br style="clear: both;" /><span class="tiny">To be used at the front page and on the collections index page</span></td></tr>
<tr class="odd"><td>Description</td><td><textarea name="collection_descriptions[]" cols="40" rows="3"></textarea><br style="clear: both;" /><span class="tiny">To be inserted on the index page of this collection</span></td></tr>
<tr class="even"><td>Prefix</td><td><textarea name="collection_prefixes[]" cols="40" rows="2"></textarea><br style="clear: both;" /><span class="tiny">Inserted on top of pages for this collection</span></td></tr>
<tr class="odd"><td>Suffix</td><td><textarea name="collection_suffixes[]" cols="40" rows="2"></textarea><br style="clear: both;" /><span class="tiny">Inserted at bottom of pages for this collection</span></td></tr>
</table>
</div></div>
<div class="section_box" id="section_1" >
<h2>Save parameters</h2>
<div><p><button type="submit" title="Press [s] to submit data" accesskey="s"><span>Submit</span></button></p>
</div></div>
</div></form><br style="clear: left;" />&nbsp;
<hr class="hide" />
</div>
<div id="extra_panel"><dl class="navigation_box" id="help" >
<dt>Help</dt>
<dd><p>The Collection Nick Name is prepended to the path of each file of the collection. Therefore it has to be as short (typically, one word) and as meaningful as possible.</p><p>The Label is the actual title for this collection. It is used as a page title on the collection index page, and in the path list at the top of each subsequent page for the collection.</p><p>The Path Prefix is prepended by the server to access every directory and file of the collection. You should indicate here the location of the collection in the local file system.</p><p>The URL Prefix is inserted in links used to download files of the collection. You should indicate here the access method (e.g., ftp) and path used to access files remotely, from a web browser.</p><p>The Introduction is used only on the main index page of all collections, while the Description is inserted in the index page of this collection.</p><p>The Prefix and Suffix are inserted respectively at the beginning and end of each page of the collection, except the index.</p></dd></dl></div>
<div id="footer_panel"><p><a href="http://validator.w3.org/check?uri=referer"><img src="/yacs7/skins/logosworld_digital/images/buttons_xhtmlw3c.gif" alt="XHTML 1.0!" height="15" width="80" /></a>Page prepared in 0.32 seconds for Admin<br />&copy;
 - <a href="/yacs7/articles/view.php?id=about">about this site</a>  - <a href="/yacs7/articles/view.php?id=privacy">privacy statement</a>  - powered by <a href="/yacs7/links/click.php?url=http%3A%2F%2Fwww.yetanothercommunitysystem.com%2F" title="Browse in a new window" class="external" onclick="window.open(this.href); return false;">yacs</a> - <a href="/yacs7/feeds/">rss feeds</a></p>
</div>
<hr class="hide" />
</div>
<div id="side_panel">
<dl class="navigation_box" id="main_menu" >
<dt>Menu</dt>
<dd><form action="/yacs7/search.php" method="get"><p style="margin: 0; padding: 0;"><input type="text" name="search" size="10" value="Search..." onfocus="this.value=''" maxlength="128" accesskey="4" /><button type="submit"><span>&raquo;</span></button></p></form>
<a href="/yacs7/" class="menu_1">Home</a><br />&raquo;&nbsp;<a href="/yacs7/sections/" class="menu_2">Site Map</a><br />&raquo;&nbsp;<a href="/yacs7/categories/" class="menu_2">Categories</a><br />&raquo;&nbsp;<a href="/yacs7/users/" class="menu_2">Users</a><br />&raquo;&nbsp;<a href="/yacs7/help.php" class="menu_2">Help</a><br /></dd></dl>
<dl class="navigation_box" id="user_menu" >
<dt>admin <a href="/yacs7/users/view.php?id=1&amp;action=admin" title="See your user profile">&raquo;</a></dt>
<dd><ul class="compact">
<li>&raquo;&nbsp;<a href="/yacs7/users/view.php?id=1&amp;action=admin" title="View all data this site knows about you">My profile</a></li>
<li>&raquo;&nbsp;<a href="/yacs7/articles/edit.php" title="Use a web form to submit new content to this site">Create a page</a></li>
<li>&raquo;&nbsp;<a href="/yacs7/images/edit.php" title="Upload a picture in a new page">Post an image</a></li>
<li>&raquo;&nbsp;<a href="/yacs7/files/edit.php" title="Upload a file in a new page">Share a file</a></li>
<li>&raquo;&nbsp;<a href="/yacs7/links/edit.php" title="Upload a link in a new page">Bookmark a link</a></li>
<li>&raquo;&nbsp;<a href="/yacs7/articles/review.php" title="Check requests, publish submitted articles, review old pages">Review queue</a></li>
<li>&raquo;&nbsp;<a href="/yacs7/users/logout.php" title="You will be considered as an anonymous surfer">Logout</a></li>
<li>&raquo;&nbsp;<a href="/yacs7/control/" title="System commands, configuration panels, content overview">Control Panel</a></li>
<li>&raquo;&nbsp;<a href="/yacs7/help.php" title="If you don't know how to proceed, start here">Help</a></li>
</ul>
</dd></dl>


<dl class="navigation_box" id="navigation" >
<dt>Hello World <a href="/yacs7/articles/view.php?id=17&amp;action=hello-world" title="View the page">&raquo;</a></dt>
<dd>This is a sample navigation box.
Visit the <a href="/yacs7/sections/view.php?id=navigation_boxes" title="Read more" class="section">navigation section</a> to review all navigation boxes.</dd></dl>

</div>
</body>
</html>




Yacs.png

Bernard Paquesfrom nearby-an-airport
Associate, 8408 posts

on Jan. 2 2008


A partir de la prochaine version, la 8.1, le fichier shared/yacs.js sera chargé dans l'en-tête de page, qu'on se le dise !

[article=3739]

Merci de votre précieux retour d'expérience, vos recommendations valent bien celles de Yahoo!...

Angeli Axel
46 posts

inspired from Bernard on Jan. 2 2008


Merci Bernard: En fait, comme vous aviez suggéré, les problèmes sont causés, quand un CSS précédent n'est pas correctement formatté (quand les parantheses sont impair - mais c'est extrèmement difficile à trouver quand on n'a pas encore un suspect). Mettre le JS dans la tète guarantit en moins l'accès aux toutes les fontinonalités. J'apprecie cette solution.

Bonne année. Axel