Support » Plugin: WP-ISPConfig 3 » Fatal error: Call to undefined method

  • Hi,

    I have one problem with free signup form. When using [ispconfig class=IspconfigRegisterFree] I get: Fatal error: Call to undefined method
    IspconfigRegisterustvarime::init() in ../web1/web/site/wp-content/plugins/wp-ispconfig3/ispconfig.php on line 110

    Any ideas how to fix? I tried making my own form, but again I get this error. Form for clients is working great. But I need that one with subdomain.

    Cheers

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author ole1986

    (@ole1986)

    Dear mufio,

    we just updated the readme with a complete example on how to use your custom form.

    Check out the installation section here:
    https://wordpress.org/plugins/wp-ispconfig3/#installation

    Follow the steps carefully and let us know if you still have issue running the shortcode “[ispconfig class=IspconfigRegisterCustom]” afterwards.

    The problem is even [ispconfig class=IspconfigRegisterFree] does not work. If free form is working I don’t have to build custom…

    Plugin Author ole1986

    (@ole1986)

    @mufio

    I fully agree, but the strange thing is that when you really trying to use the shortcode
    “[ispconfig class=IspconfigRegisterFree]” why you get an error message:

    Call to undefined method
    IspconfigRegisterustvarime::init()

    ustvarime is not known to me

    So maybe you have mistakenly inherited the class?!

    Indeed, sorry I pasted error from custom form. First I tried to copy whole ispconfig_register_free.php to ispconfig_register_ustvarime.php in hopeps that creating a new form will solve my problem.

    When i try to use free [ispconfig class=IspconfigRegisterFree] i got this:

    Fatal error: Call to undefined method IspconfigRegisterFree::init() in /var/www/clients/client0/web1/web/site/wp-content/plugins/wp-ispconfig3/ispconfig.php on line 110

    I can provide you with url if needed.
    Thank you.

    Plugin Author ole1986

    (@ole1986)

    @mufio

    confirmed as a bug – thank you for reporting! Will be fixed shortly

    Alternatively, you can take ispconfig_register_client.php or copy the IspconfigRegisterCustom class from the configuration example.

    Or fix it yourself using the following patchfile:

    
    diff --git a/ispconfig_register_free.php b/ispconfig_register_free.php
    index 9518fda..509ecd4 100644
    --- a/ispconfig_register_free.php
    +++ b/ispconfig_register_free.php
    @@ -6,6 +6,7 @@ defined( 'ABSPATH' ) || exit;
      * Free registration form example
      */
     class IspconfigRegisterFree {
    +    public static $Self;
         /**
          * Used to provide subdomain registration instead of domain registration in frontend using the below template ID
          */
    @@ -17,7 +18,11 @@ class IspconfigRegisterFree {
          * List of Client Limit Template from ISPConfig
          */
         public $products = [];
    -
    +
    +    public static function init(){
    +        self::$Self = new self();
    +    }
    +
         public function __construct(){
             // contains any of the below word is forbidden in username
             $this->forbiddenUserEx = 'www|mail|ftp|smtp|imap|download|upload|image|service|offline|online|admin|root|username|webmail|blog|help|support';
    
    Plugin Author ole1986

    (@ole1986)

    Recommend to update to version 1.1.17 once its available.

    Thank you again for reporting!

    Works like charm now.

    Thank you for fast bug fix, appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Fatal error: Call to undefined method’ is closed to new replies.