Ho un problema con questo aiutante: https://github.com/kshakirov/cakephp-lang-helper
Questo aiutante mi dà questo errore e non trovo il motivo:
Fatal Error
Error: Call to a member function input() on a non-object
File: appViewHelperLangHelper.php
Line: 670
risposte:
1 per risposta № 1Immagino che il problema sia che LangHelper ha la precedenza sul genitore __construct
metodo, impedendo a Cake di impostare correttamente l'Aiutante. Cambia LangHelper "s __construct()
al seguente:
public function __construct(View $View, $settings = array()) {
parent::__construct($View, $settings);
$this->mapper = $this->parseLangHeaders();
$this->langCode = $this->findLangCode();
$this->countryCode = $this->findCountryCode();
}
0 per risposta № 2
Hai attivato il file FormHelper
nel AppController
?
App::uses("FormHelper", "View/Helper"); // Don"t forget this one in Cake 2.x
class AppController extends Controller
{
public
$helpers = array("Form");
}