Hi Darius,

we discussed about this problem before releasing OXID eShop v4, and discussed 2 possible solutions.

1. Creating separate template for one hidden field, which is not performance friendly.

2. One more configuration option like isXHML=[true|false], possible, but we already have a module array.

As in templates hidden session id and form navigation parameter input fields are returned from oxViewConfig,
lets write a simple module for it.

create file: modules/myxhtml.php

<?php
class myXHTML extends myXHTML_parent
{
   public function getHiddenSid()
   {
if ( ( $sValue = $this->getViewConfigParam( 'hiddensid' ) ) === null ) {
           $sValue = str_replace('>',' />',parent::getHiddenSid());
           $this->setViewConfigParam( 'hiddensid', $sValue );
       }
       return $sValue;
   }

   public function getNavFormParams()
   {
if ( ( $sParams = $this->getViewConfigParam( 'navformparams' ) ) === null ) {
           $sParams = str_replace('>',' />',parent::getNavFormParams());
           $this->setViewConfigParam( 'navformparams', $sParams );
       }
       return $sParams;
   }
}
?>

install module: oxviewconfig => myxhtml


Best regards,
Alfonsas Cirtautas






----- Original Message ----- From: "Darius Tumas" <[email protected]>
To: <[email protected]>
Sent: Tuesday, October 13, 2009 9:25 AM
Subject: [oxid-dev-general] force_sid/sid hidden input field not valid inxhtml


Hello,

In all forms we use [{ $oViewConf->getHiddenSid() }] to get sid or force_sid value. At the moment it returns INPUT field not compatible with xhtml. The
tag is not closed '/>'.

As i found its generated in oxsession.php, hiddenSid().

Maybe in the future will be better or to avoid html generation in core
classes or add some option to point out what html we will get.



Respectfully,

Darius Tumas
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general



_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

Reply via email to