Joomla 6 Notice

We are pleased to announce that all our Joomla extensions have been compatible with Joomla 6 since October 14th, 2025.

For those currently upgrading from Joomla 3 to 4: Instructions for Joomla 4 migration can be found here:

There are standalone documentations Visforms Joomla 4, Visforms Joomla 5 and Visforms Joomla 6.

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.

Important information for almost every question:
V1: Which Visforms version is running?
V2: Which Joomla version is running?
V3: Which PHP version is running?

Codebeispiel in der Doku erzeugt Fehler

More
3 years 1 week ago - 3 years 1 week ago #9125 by MaliRaj
Nur eine Info für die Aktualisierung der Dokumentation:
der Beispielcode1, konkret der redirect-Aufruf, unter
docs.joomla-4.visforms.vi-solutions.de/d...-benutzer-verhindern
Code:
$user = JFactory::getUser(); if (!$user->id) { $message = 'Please log in first'; $app = JFactory::getApplication(); $input = $app->input; $return = $input->post->get('return', null, 'cmd'); $url = (!empty($return)) ? base64_decode(strtr($return, '-_,', '+/=')) : 'index.php'; ==>  $app->redirect(JRoute::_($url, false), $message, 'warning');  <== $app->close(); }
erzeugt bei mir den Fehler: "You have not supplied a valid HTTP status code"

Abhilfe schaffte bei mir die da Aufteilung in zwei einzelne Befehlszeilen, wie ich sie auch in anderen Custom Plugin Stellen nutze:
Code:
$app->enqueueMessage($message, 'warning'); $app->redirect(JRoute::_($url, false));

Vielleicht hilft es jemandem mit gleichem Fehler.

Freundliche Grüße aus PM
Heinz
(Joomla 5.2.3 / Visforms+Subscription 5.4.1 / PHP 8.2)
Last edit: 3 years 1 week ago by Administrator IV.

More
3 years 1 week ago #9129 by Administrator IV
Replied by Administrator IV on topic Codebeispiel in der Doku erzeugt Fehler
Hallo Heinz,

das Code-Beispiel ist an dieser Stelle tatsächlich und ziemlich grob falsch.
Der Fehler ist laut Signatur der Funktion erwartbar:
Code:
* @param   string   $url     The URL to redirect to. Can only be http/https URL * @param   integer  $status  The HTTP 1.1 status code to be provided. 303 is assumed by default. \Joomla\CMS\Application\CMSApplication::redirect($url, $status = 303)
Vielen herzlichen Dank für deine Korrektur.
Die Dokumentation habe ich gerade angepasst.

Beispiel-Code 1: Submit durch nicht angemeldete Benutzer verhindern:
docs.joomla-4.visforms.vi-solutions.de/d...-benutzer-verhindern

Liebe Grüße, Ingmar

:idea: I recommend you the new and up-to-date documentation for Joomla 6:
docs.joomla-6.visforms.vi-solutions.de/en/docs/
Please ask only 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 6:
docs.joomla-6.visforms.vi-solutions.de/docs/
Bitte immer nur 1 Frage pro Thema stellen :-).
The following user(s) said Thank You: MaliRaj

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum