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.

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

Error after updating my submit handler plugin for Joomla 5

More
5 days 11 hours ago #11860 by PTCWebmaster
I have followed the instructions in the "Code correction of your own plugins" documentation (Visforms 5) to update my submit handler plugin. After installing the plugin and go to use one of my forms I get the error:
0 - Undefined constant "Visolutions\Plugin\Visforms\Ptcsubmithandler\Extension\Ptcsubmithandler"
In the call stack it is triggered by - JROOT\plugins\visforms\ptcsubmithandler\services\provider.php:24

I have double checked all my changes to match the instructions. Therefore, I need help to solve this error please.
I have attached the code for the associated Provider PHP file to help.
 

File Attachment:

File Name: provider.txt
File Size:2 KB


V1: Which Visforms version is running? - 5.5.1
V2: Which Joomla version is running? - 5.3.4
V3: Which PHP version is running? - 8.2.18

More
5 days 8 hours ago #11861 by Administrator AV
Replied by Administrator AV on topic Error after updating my submit handler plugin for Joomla 5
Hello,

thanks for your message.

The instruction was incorrect at this point.
I've already corrected the instruction in the documentation.
docs.joomla-5.visforms.vi-solutions.de/e...update-plugins-code/

The use keyword is missing.

Correct:
Code:
use Visolutions\Plugin\Visforms\Myplugin\Extension\Myplugin;

In your case
Code:
use Visolutions\Plugin\Visforms\Ptcsubmithandler\Extension\Ptcsubmithandler;

Kind Regards,
Aicha

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

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

More
4 days 15 hours ago #11864 by PTCWebmaster
Great. I made that change but now I have the following error:
Visolutions\Plugin\Visforms\Ptcsubmithandler\Extension\Ptcsubmithandler::__construct(): Argument #1 ($subject) must be of type Visolutions\Plugin\Visforms\Ptcsubmithandler\Extension\DispatcherInterface, Joomla\Event\Dispatcher given, called in C:\wamp64\www\PTC\plugins\visforms\ptcsubmithandler\services\provider.php on line 35

I do know PHP classes but I cant work out why this error is there. Your help again would be appreciated.

To help here is a copy of my plugin which was working with V4 and again which I changed as per the instructions.
 

File Attachment:

File Name: ptcplugin.txt
File Size:7 KB

More
4 days 2 hours ago #11865 by Administrator AV
Replied by Administrator AV on topic Error after updating my submit handler plugin for Joomla 5
Hi,

The instruction in the documentation was not fully complete.
I've already corrected the documentation.

In your plugin file Ptcsubmithandler.php please add the following use statement.
Code:
use Joomla\Event\DispatcherInterface;

Regards,
Aicha

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

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

More
1 day 15 hours ago #11868 by PTCWebmaster
Thank you Aicha

My plugin is now working. I appreciate your help. I'm also pleased that I was able to help highlight the errors in the instruction documentation.
Regards

Lyndsay

More
1 day 8 hours ago #11869 by Administrator AV
Replied by Administrator AV on topic Error after updating my submit handler plugin for Joomla 5
Hi Lyndsay,

I'm glad, your plugin is working now.

I, very much appreciate, that your work help us improve the documentation.

Thanks for your patience!

Kind Regards,
Aicha

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

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

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum