[TYPO3-mvc] different behavior locally and on server.
Braulio J. Solano-Rojas
braulio at solsoft.biz
Tue Sep 14 04:14:21 CEST 2010
Hi.
There is something that has been puzzling me for some days. I have some
code that works perfectly on my local machine, but on the server it doesn't.
Locally I am running windows and TYPO3 4.4.0, and in the server I have
FreeBSD and TYPO3 4.4.2. I know that extbase and fluid versions are
different on those versions. Therefore I renamed the extensions on the
server and uploaded my local extensions (extbase and fluid) but I still
have the same problem.
I have a code like this:
if ( $feUserUid = $GLOBALS['TSFE']->fe_user->user['uid'] ) {
$this->view->assign('askName', 0);
$feUser = $this->getFeUserById($feUserUid);
$this->view->assign('firstname', $feUser->getFirstName() );
$this->view->assign('lastname', $feUser->getLastName() );
$this->view->assign('email', $feUser->getEmail() );
$this->view->assign('type', 'hidden');
}
else {
$this->view->assign('askName', 1);
$this->view->assign('type', 'text');
}
And in the template I have something like:
<f:if condition="{askName}">
<f:then>
<label for="tx_cactusquote_pi1[newQuote][lastname]">
<f:translate key="tx_cactusquote_domain_model_quote.lastname" />
<span style="color:red">*</span>
</label>
<f:form.textfield property="lastname" size="45" type="{type}" />
<label for="tx_cactusquote_pi1[newQuote][firstname]">
<f:translate key="tx_cactusquote_domain_model_quote.firstname" />
<span style="color:red">*</span>
</label>
<f:form.textfield property="firstname" size="45" type="{type}" />
<label for="tx_cactusquote_pi1[newQuote][email]">
<f:translate key="tx_cactusquote_domain_model_quote.email" />
<span style="color:red">*</span>
</label>
<f:form.textfield property="email" size="45" />
</f:then>
<f:else>
<f:form.textfield property="lastname" size="45" type="{type}"
value="{lastname}" />
<f:form.textfield property="firstname" size="45" type="{type}"
value="{firstname}" />
<f:form.textfield property="email" size="45" type="{type}"
value="{email}" />
</f:else>
</f:if>
That works nice on my machine. When a user is logged it generates hidden
inputs with the values indicated. However on the server it enters the
if and generates hidden inputs but without values.
I also have a problem with another template were I have:
<f:link.page pageUid="{quotesPid}">Demander un nouveau devis</f:link.page>
I am setting correctly quotesPid in the controller and it works in my
local machine, but on the server it's like that variable is not being
passed and accordingly the link is generated targeting the current page.
Since my server is a hosting I can't use something like xdebug. :-(
What do you think the problem could be. Typoscript? Any clues? Ideas?
Best regards,
B.
More information about the TYPO3-project-typo3v4mvc
mailing list