Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

Formular kann nicht im Frontend geöffnet werden

More
3 years 9 months ago #6960 by Kassier
PHP Version: 7.3.18 // Joomla! 3.9.19 Stable // Visforms Subscription Unlimited: 3.13.12
Installation der Visforms Erweiterung O.K.
Formularerstellung kein Problem. (Schon in einer offline-Umgebung unter WIN10 getestet)
Die Anzeige im Frontend (oneline) scheitert, es kommt folgende Fehlermeldung:

0 - Too few arguments to function JLayoutFile::render(), 0 passed in /home/.sites/655/site1177/web/components/com_visforms/views/visforms/tmpl/default.php on line 51 and exactly 1 expected

Ich habe das Formular öfters gecheckt, habe auch mit nur einem Feld probiert, leider
Wer hat eine Idee ?

More
3 years 9 months ago #6961 by Administrator AV
Replied by Administrator AV on topic Formular kann nicht im Frontend geöffnet werden
Hallo,

Es gibt seit geraumer Zeit weltweit mehrere Zehntausend Visforms Installationen.
Alle gemeldeten Fehler werden zeitnah gefixt und aktuell sind keine Probleme bekannt.
Das von dir genannte Problem tritt bei niemandem sonst auf.

Ich denke, da stimmt etwas mit deinem Joomla! nicht.
Die Klasse JLayoutFile wird in Joomla! 3.9.x per class mapping (in der Datei libraries\classmap.php) auf die Datei libraries\src\Layout\FileLayout.php gemapt.
Die Funktion render() in dieser Datei (FileLayout.php) auf Zeile 97, hat einen Default für den erwarteten Parameter gesetzt.
public function render($displayData = array())
Deshalb ergibt der Fehler "0 passed .... exactly 1 expected" keinen Sinn. Es wird zwar in der Visforms Datei kein Parameter an die render() Funktion übergeben, aber das ist auch nicht nötig, weil es ja den Default gibt.

Offensichtlich ist in deiner Joomla! Installation entweder das Class Mapping nicht korrekt, oder die Funktion render($displayData = array()) in der FileLayout.php Datei entspricht nicht dem Orginalzustand.

Gruß,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum