Ciao,<br>premesso che non ho molta dimestichezza con Mapfish, <br>ma poichè proprio come dice Francesco anche secondo me che gli errori sono dovuti<br>al modo in cui FF4  gestisce le inclusioni di file .js.<br>posso suggerire di provare ad applicare al file MapFish.js (1.2) <br>


una patch simile con le correzioni che sono state apportate al file OpenLayers.js (aggiornanto così alla 2.11)<br>i file MapFish.js e OpenLayers.js infatti sono piuttosto "simili"...<br>Non me ne vogliano i puristi ... ho lasciato commentate le parti di codice precedenti e che ho sostituito,<br>


le indentazioni e il codice sono sicuramente migliorabili, ma come spunto dovrebbe essere sufficiente.<br><br>/*<br> * Copyright (C) 2009  Camptocamp<br> *<br> * This file is part of MapFish Client<br> *<br> * MapFish Client is free software: you can redistribute it and/or modify<br>


 * it under the terms of the GNU General Public License as published by<br> * the Free Software Foundation, either version 3 of the License, or<br> * (at your option) any later version.<br> *<br> * MapFish Client is distributed in the hope that it will be useful,<br>


 * but WITHOUT ANY WARRANTY; without even the implied warranty of<br> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br> * GNU General Public License for more details.<br> *<br> * You should have received a copy of the GNU General Public License<br>


 * along with MapFish Client.  If not, see <<a href="http://www.gnu.org/licenses/" target="_blank">http://www.gnu.org/licenses/</a>>.<br> */<br><br>/*<br> * This code is taken from the OpenLayers code base.<br> *<br>

 * Copyright (c) 2006-2007 MetaCarta, Inc., published under the Clear BSD<br>
 * license.  See <a href="http://svn.openlayers.org/trunk/openlayers/license.txt" target="_blank">http://svn.openlayers.org/trunk/openlayers/license.txt</a> for the<br> * full text of the license.<br> */<br><br>(function() {<br>

    /**<br>
     * Before creating the mapfish namespace, check to see if<br>     * mapfish.singleFile is true. This occurs if the<br>     * SingleFile.js script is included before this one - as is the<br>     * case with single file builds.<br>


     */<br>    var singleFile = (typeof window.mapfish == "object" && window.mapfish.singleFile);<br><br>    var jsFiles = window.mapfish;<br><br>    /**<br>     * Namespace: mapfish<br>     * The mapfish object provides a namespace for all things <br>


     */<br>    window.mapfish = {<br><br>        /**<br>         * Property: _scriptName<br>         * {String} Relative path of this script.<br>         */<br>        _scriptName: "MapFish.js",<br><br>        /**<br>


         * Function: _getScriptLocation<br>         * Return the path to this script.<br>         *<br>         * Returns:<br>         * Path to this script<br>         */<br>        /*_getScriptLocation: function () {<br>


            // Workaround for Firefox bug:<br>            // <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=351282" target="_blank">https://bugzilla.mozilla.org/show_bug.cgi?id=351282</a><br>            if (window.gMfLocation) {<br>


                return window.gMfLocation;<br>            }<br><br>            var scriptLocation = "";<br>            var scriptName = mapfish._scriptName;<br>         <br>            var scripts = document.getElementsByTagName('script');<br>


            for (var i = 0; i < scripts.length; i++) {<br>                var src = scripts[i].getAttribute('src');<br>                if (src) {<br>                    var index = src.lastIndexOf(scriptName); <br>


                    // is it found, at the end of the URL?<br>                    if ((index > -1) && (index + scriptName.length == src.length)) {  <br>                        scriptLocation = src.slice(0, -scriptName.length);<br>


                        break;<br>                    }<br>                }<br>            }<br>            return scriptLocation;<br>         }*/<br><br>/*MODIFICA*/<br>    _getScriptLocation: (function() {<br>    <br>

            var scriptName = mapfish._scriptName;<br>
<br>            var r = new RegExp("(^|(.*?\\/))(" + scriptName + ")(\\?|$)"),<br>                s = document.getElementsByTagName('script'),<br>                src, m, l = "";<br>            for(var i=0, len=s.length; i<len; i++) {<br>


                src = s[i].getAttribute('src');<br>                if(src) {<br>                    var m = src.match(r);<br>                    if(m) {<br>                        l = m[1];<br>                        break;<br>


                    }<br>                }<br>            }<br>            return (function() { return l; });<br>        })()<br>    };<br>/*FINE MODIFICA*/<br><br>    /**<br>     * mapfish.singleFile is a flag indicating this file is being included<br>


     * in a Single File Library build of the MapFish Library.<br>     * <br>     * When we are *not* part of a SFL build we dynamically include the<br>     * MapFish library code.<br>     * <br>     * When we *are* part of a SFL build we do not dynamically include the <br>


     * MapFish library code as it will be appended at the end of this file.<br>      */<br>    if(!singleFile) {<br>        var jsFiles = new Array(<br>            "lang/en.js",<br>            "core/Color.js",<br>


            "core/GeoStat.js",<br>            "core/GeoStat/Choropleth.js",<br>            "core/GeoStat/ProportionalSymbol.js",<br>            "core/Routing.js",<br>            "core/Util.js",<br>


            "core/Searcher.js",<br>            "core/Searcher/Map.js",<br>            "core/Searcher/Form.js",<br>            "core/PrintProtocol.js",<br>            "core/Offline.js",<br>


            "core/Protocol.js",<br>            "core/Protocol/MapFish.js",<br>            "core/Protocol/MergeFilterDecorator.js",<br>            "core/Protocol/TriggerEventDecorator.js",<br>


            "core/Strategy.js",<br>            "core/Strategy/ProtocolListener.js",<br>            "widgets/MapComponent.js",<br>            "widgets/Shortcuts.js",<br>            "widgets/ComboBoxFactory.js",<br>


            "widgets/recenter/Base.js",<br>            "widgets/recenter/Coords.js",<br>            "widgets/recenter/DataField.js",<br>            "widgets/data/FeatureReader.js",<br>


            "widgets/data/FeatureStore.js",<br>            "widgets/data/FeatureStoreMediator.js",<br>            "widgets/data/SearchStoreMediator.js",<br>            "widgets/data/LayerStoreMediator.js",<br>


            "widgets/data/GridRowFeatureMediator.js",<br>            "widgets/geostat/Choropleth.js",<br>            "widgets/geostat/ProportionalSymbol.js",<br>            "widgets/tree/LayerTree.js",<br>


            "widgets/tree/LayerTreeExtra.js",<br>            "widgets/toolbar/Toolbar.js",<br>            "widgets/toolbar/CheckItem.js",<br>            "widgets/toolbar/MenuItem.js",<br>


            "widgets/editing/FeatureList.js",<br>            "widgets/editing/FeatureProperties.js",<br>            "widgets/editing/FeatureEditingPanel.js",<br>            "widgets/print/Base.js",<br>


            "widgets/print/BaseWidget.js",<br>            "widgets/print/SimpleForm.js",<br>            "widgets/print/MultiPage.js",<br>            "widgets/print/PrintAction.js",<br>


            "widgets/search/Form.js"<br>        ); // etc.<br><br>        /*var allScriptTags = "";<br>        var host = mapfish._getScriptLocation();<br>    <br>        for (var i = 0; i < jsfiles.length; i++) {<br>


            if (/MSIE/.test(navigator.userAgent) || /Safari/.test(navigator.userAgent)) {<br>                var currentScriptTag = "<script src='" + host + jsfiles[i] + "'></script>"; <br>


                allScriptTags += currentScriptTag;<br>            } else {<br>                var s = document.createElement("script");<br>                s.src = host + jsfiles[i];<br>                var h = document.getElementsByTagName("head").length ? <br>


                           document.getElementsByTagName("head")[0] : <br>                           document.body;<br>                h.appendChild(s);<br>            }<br>        }<br>        if (allScriptTags) {<br>


            document.write(allScriptTags);<br>        }*/<br><br>/*MODIFICA*/<br>    // use "parser-inserted scripts" for guaranteed execution order<br>        // <a href="http://hsivonen.iki.fi/script-execution/" target="_blank">http://hsivonen.iki.fi/script-execution/</a><br>


        var scriptTags = new Array(jsFiles.length);<br>        var host = mapfish._getScriptLocation();<br>        for (var i=0, len=jsFiles.length; i<len; i++) {<br>            scriptTags[i] = "<script src='" + host + jsFiles[i] +<br>


                                   "'></script>"; <br>        }<br>        if (scriptTags.length > 0) {<br>            document.write(scriptTags.join(""));<br>        }<br>/*FINE MODIFICA*/<br>


    }<br>})();<br><br>Saluti,<br>Marica<br><br>PS. mi scuso per il testo piuttosto lungo ma non so se è possibile inviare allegati alla ML.<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<br>
Il 24 maggio 2011 18:16, francesco marucci<br>
<<a href="mailto:francesco.marucci@gmail.com" target="_blank">francesco.marucci@gmail.com</a>> ha scritto:<br>
<div><div>> ciao a tutti,<br>
> ho un problema che da qualche giorno non riesco a risolvere.<br>
><br>
> con l'uscita di Firefox 4, il mio framework di Mapfish client 1.2 non mi<br>
> funziona piu'.<br>
><br>
> l'errore ricorrente di Javascript e':<br>
><br>
> mapfish.widget is undefined<br>
><br>
> e me lo da alla prima chiamata di un widget, nel mio caso il<br>
> mapfish.widget.createScaleComboBox.<br>
><br>
> ne seguono una serie di altri errori, ma penso che siano dovuti tutti allo<br>
> stesso motivo, ovvero come Firefox 4 gestisce le inclusioni di file .js.<br>
><br>
> Ho aggiornato il file OpenLayers.js con il file disponibile per la 2.11,<br>
> cosi' come descritto da Lemoine lo scorso aprile:<br>
> <a href="http://lists.mapfish.org/pipermail/users/2011-April/003259.html" target="_blank">http://lists.mapfish.org/pipermail/users/2011-April/003259.html</a><br>
><br>
> dopo aver fatto questa modifica non  ho piu' errori dal lato OpenLayers, ma<br>
> il mapfish.widget is undefined mi rimane,<br>
> e di fatto tutta l'applicazione non funziona correttamente.<br>
><br></div></div></blockquote></div><br>