Back to top

Autore Topic: problema file view.php  (Letto 1645 volte)

Offline balda984

  • Nuovo arrivato
  • *
  • Post: 3
    • Mostra profilo
problema file view.php
« il: 14 Ago 2013, 15:18:25 »
Salve a tutti
mi dispiace disturbarvi ma non riesco ad uscirne...
negli articoli sul mio sito joomla mi esce un errore:

Strict Standards:  Declaration of JCacheControllerView::get() should be compatible with JCacheController::get($id, $group = NULL) in /web/htdocs/www.nomemiosito.it/home/libraries/joomla/cache/controller/view.php on line 121

questo è il file:

<?php
/**
 * @version        $Id: view.php 18013 2010-07-03 03:42:31Z infograf768 $
 * @package        Joomla.Framework
 * @subpackage    Cache
 * @license        GNU General Public License version 2 or later; see LICENSE.txt
 */

// No direct access
defined('JPATH_BASE') or die;

/**
 * Joomla! Cache view type object
 *
 * @package        Joomla.Framework
 * @subpackage    Cache
 * @since        1.6
 */
class JCacheControllerView extends JCacheController
{
    /**
     * Get the cached view data
     *
     * @param    object    $view    The view object to cache output for
     * @param    string    $method    The method name of the view method to cache output for
     * @param    string    $group    The cache data group
     * @param    string    $id        The cache data id
     * @return    boolean    True if the cache is hit (false else)
     * @since    1.6
     */
    public function get(&$view, $method, $id=false, $wrkarounds=true)
    {
        // If an id is not given generate it from the request
        if ($id == false) {
            $id = $this->_makeId($view, $method);
        }

        $data = false;
        $data = $this->cache->get($id);

        $locktest = new stdClass;
        $locktest->locked = null;
        $locktest->locklooped = null;

        if ($data === false) {
            $locktest = $this->cache->lock($id,null);
            // if the loop is completed and returned true the means the lock has been set
            // if looped is true try to get the cached data again; it could exist now
            if ($locktest->locked == true && $locktest->locklooped == true) {
                $data = $this->cache->get($id);
            }
            // false means that locking is either turned off or maxtime has been exceeeded, execute the view
        }

        if ($data !== false) {
            $data        = unserialize(trim($data));

            if ($wrkarounds === true) {
                echo JCache::getWorkarounds($data);
            }

            else {  // no workarounds, all data is stored in one piece
                echo (isset($data)) ? $data : null;
            }

            if ($locktest->locked == true) {
                $this->cache->unlock($id);
            }

            return true;
        }

        /*
         * No hit so we have to execute the view
         */
        if (method_exists($view, $method)) {
            // if previous lock failed try again
            if ($locktest->locked == false) {
                $locktest = $this->cache->lock($id);
            }

            // Capture and echo output
            ob_start();
            ob_implicit_flush(false);
            $view->$method();
            $data = ob_get_contents();
            ob_end_clean();
            echo $data;

            /*
             * For a view we have a special case.  We need to cache not only the output from the view, but the state
             * of the document head after the view has been rendered.  This will allow us to properly cache any attached
             * scripts or stylesheets or links or any other modifications that the view has made to the document object
             */
            $cached = array();

            $cached = $wrkarounds == true ? JCache::setWorkarounds($data) : $data;

            // Store the cache data
            $this->cache->store(serialize($cached), $id);

            if ($locktest->locked == true) {
                $this->cache->unlock($id);
            }
        }
        return false;
    }

    /**
     * Generate a view cache id.
     *
     * @param    object    $view    The view object to cache output for
     * @param    string    $method    The method name to cache for the view object
     * @return    string    MD5 Hash : view cache id
     * @since    1.6
     */
    private function _makeId(&$view, $method)
    {
        return md5(serialize(array(JCache::makeId(), get_class($view), $method)));
    }
}




ho installato joomla 1.6.1 stable
Spero possiate aiutarmi
Grazie in anticipo
Ciao a tutti
Enrico

Offline tomtomeight

  • Global Moderator
  • Fuori controllo
  • ********
  • Post: 32046
  • Sesso: Maschio
  • Gli automatismi aiutano ma non insegnano nulla.
    • Mostra profilo
Re:problema file view.php
« Risposta #1 il: 14 Ago 2013, 15:22:43 »
Ciao e benvenuto nel forum joomla.it
La versione 1.6.1 è tutt'altro che stabile, essendo solo una versione di transizione questa è stata subito abbandonata e se ne sconsiglia fortemente l'utilizzo. Passa subito ad installare una nuova versione 3.1.5 ultima utile disponibile al momento.

Offline balda984

  • Nuovo arrivato
  • *
  • Post: 3
    • Mostra profilo
Re:problema file view.php
« Risposta #2 il: 14 Ago 2013, 15:26:04 »
Grazie della risposta...
cioè dovrei installare tutto da capo?
la versione 3.1.5 è affidabile?
Grazie

Offline tomtomeight

  • Global Moderator
  • Fuori controllo
  • ********
  • Post: 32046
  • Sesso: Maschio
  • Gli automatismi aiutano ma non insegnano nulla.
    • Mostra profilo
Re:problema file view.php
« Risposta #3 il: 14 Ago 2013, 15:29:05 »
Sì la versione 3.1.5 adesso è affidabile, poi dovrai seguirne gli aggiornamenti.

Offline balda984

  • Nuovo arrivato
  • *
  • Post: 3
    • Mostra profilo
Re:problema file view.php
« Risposta #4 il: 14 Ago 2013, 15:30:44 »
Grazie ancora...
allora eseguirò nuovamente l'installazione
Ciao Enrico

 



Web Design Bolzano Kreatif