Zend FR

Consultez la FAQ sur le ZF avant de poster une question

Vous n'êtes pas identifié.

#1 04-02-2010 20:42:45

erehcab
Membre
Date d'inscription: 17-11-2009
Messages: 63

Problème de perte de session

Bonjour à tous, j'ai une perte de session bizarre lorsque j'affiche le listing des donnés d'une table dans mon application.

Je m'explique, la déconnexion se passe lorsque j'affiche le listing d'une table dans une vue et qu'il y a plus de deux enregistrements à afficher. S'il n'y a que deux enregistrement (ou moins) à afficher il ne se déconnecte pas .....

Je suis complètement perdu, si quelqu'un pouvait me donner des pistes de recherche ça serait super.

Pour infos voilà comment je récupère les donnés de la table à afficher :

Code:

        $fixedlabelsdefinition = Farnsworth_Cache::get('fixedlabelsdefinition');
        $this->view->cached = (boolean) $fixedlabelsdefinition;
        if (!$fixedlabelsdefinition) {
            $fixedlabelsdefinitionListTable = new Table_Fixedlabelsdefinition();
            $fixedlabelsdefinition = $fixedlabelsdefinitionListTable->fetchAll()->toArray();
            Farnsworth_Cache::set($fixedlabelsdefinition, 'fixedlabelsdefinition');
        }
        $paginator = Zend_Paginator::factory($fixedlabelsdefinition);
        $paginator->setItemCountPerPage(10);
        $paginator->setCurrentPageNumber($this->getRequest()->getParam('page'));
        $this->view->fixedlabelsdefinition = $paginator;

et voilà le script de ma vue :

Code:

<!-- Liste -->
<p><?php if ($this->isAllowed('fixedlabelsdefinition', 'edit')) : ?><a href="<?php echo $this->link('fixedlabelsdefinition', 'edit'); ?>"><?php echo $this->translate("Add fixed label"); ?></a><?php endif; ?></p><br />
<div id="fixedlabeldefinitionlist" class="list">
<table id="primwaytable">
  <thead>
  <tr>
    <th><?php echo $this->translate("Primway Label name"); ?></th>
    <th><?php echo $this->translate("Label StoreGrp"); ?></th>
    <th><?php echo $this->translate("Label Familly"); ?></th>
    <th><?php echo $this->translate("Label Status"); ?></th>
    <th><?php echo $this->translate("DO Label name "); ?></th>    
    <th><?php echo $this->translate("Label Description"); ?></th>
    <th><?php echo $this->translate("Minimum Order Qty "); ?></th>
    <th><?php echo $this->translate("Packaging"); ?></th>
    <th><?php echo $this->translate("Picture"); ?></th>
    <th>Actions</th>
  </tr>
  </thead>
  <tbody>  
<?php print var_dump($this->fixedlabelsdefinition); ?>
<?php foreach ($this->fixedlabelsdefinition as $fixedlabelsdefinition) : ?>
  <tr>
    <td><?php echo $fixedlabelsdefinition['Primway_Label_name']; ?></td>
    <td><?php echo $fixedlabelsdefinition['Label_StoreGrp']; ?></td>
    <td><?php echo $fixedlabelsdefinition['Label_Familly']; ?></td>
    <td><?php echo $fixedlabelsdefinition['Label_Status']; ?></td>
    <td><?php echo $fixedlabelsdefinition['DO_Label_name']; ?></td>
    <td><?php echo $fixedlabelsdefinition['Label_Description']; ?></td>
    <td><?php echo $fixedlabelsdefinition['Minimum_Order_Qty']; ?></td>
    <td><?php echo $fixedlabelsdefinition['Packaging']; ?></td>
    <td><?php if($fixedlabelsdefinition['Picture_path']!="") :  ?><a href="<?php echo URI; ?>/public/media/fixedlabels/<?php echo $fixedlabelsdefinition['Picture_path']; ?>" rel="lightbox"><img src="<?php echo URI; ?>/public/media/fixedlabels/thumbnail/<?php echo $fixedlabelsdefinition['Picture_path']; ?>" alt="<?php echo $fixedlabelsdefinition['Picture_path']; ?>" /></a><?php endif; ?></td>
    <td>
      <?php if ($this->isAllowed('fixedlabelsdefinition', 'delete')) : ?><a class="delete" href="<?php echo $this->link('fixedlabelsdefinition', 'delete'); ?>/u/<?php echo $fixedlabelsdefinition['Label_id']; ?>"><?php echo $this->translate("Delete"); ?></a> |<?php endif; ?> 
      <?php if ($this->isAllowed('fixedlabelsdefinition', 'edit')) : ?><a href="<?php echo $this->link('fixedlabelsdefinition', 'edit'); ?>/u/<?php echo $fixedlabelsdefinition['Label_id']; ?>"><?php echo $this->translate("Edit"); ?></a><?php endif; ?>
    </td>
  </tr>
<?php endforeach; ?>
  </tbody>
</table>

<!-- Pagination display -->
<?php echo $this->fixedlabelsdefinition; ?>

<!-- informations -->
<p>
<?php if ($this->cached) : ?>
  <?php echo $this->translate("Result from the cache"); ?>
<?php else : ?>
  <?php echo $this->translate("Result from the database"); ?>
<?php endif; ?>
 | <?php echo $this->translate("Data of this page in other formats"), '&nbsp;:&nbsp;';
         foreach (array('xml') as $format) {
             echo '<a href="', $this->link('fixedlabelsdefinition', null, '', array('format'=>$format)), '">',$format,'</a>';
         }
   ?>
</p>
</div>

Ce qui me perturbe un max c'est que dans ce même projet j'ai plusieurs listing différent de tables différentes et tous fonctionne correctement sauf celui là ...

Dernière modification par erehcab (05-02-2010 12:28:44)

Hors ligne

 

#2 05-02-2010 14:15:10

erehcab
Membre
Date d'inscription: 17-11-2009
Messages: 63

Re: Problème de perte de session

Je viens de me rendre compte que lorsque je supprime la balise img dans ma vue le programme fonctionne parfaitement bien et je n'ai plus de déconnexion....

Hors ligne

 

Pied de page des forums

Propulsé par PunBB
© Copyright 2002–2005 Rickard Andersson
Traduction par punbb.fr

Graphisme réalisé par l'agence Rodolphe Eveilleau
Développement par Kitpages