Jump to content

5.1 domains_tlds does not exist error (error viewing and creating services)


Jono

Recommended Posts

This error occurs when the new Domain Manager plugin is not install.  To resolve, install the Domain Manager or perform the following code changes:

In core/Pricing/Modifier/Type/Description/Type/Domain/Domains.php around line 232 replace:

        try {
            Loader::loadModels($this, ['Domains.DomainsTlds']);

            $tld = $this->DomainsTlds->getByPackage($package_id);
            $package = (isset($tld->tld) ? $tld->tld : $package);
        } catch (Throwable $e) {
            // Nothing to do
        }

With

        Loader::loadModels($this, ['PluginManager']);
        if ($this->PluginManager->isInstalled('domains', \Configure::get('Blesta.company_id'))) {
            Loader::loadModels($this, ['Domains.DomainsTlds']);

            $tld = $this->DomainsTlds->getByPackage($package_id);
            $package = (isset($tld->tld) ? $tld->tld : $package);
        }


In core/Pricing/Presenter/Items/Service/ServiceDataItems.php around line 139 replace:

        try {
            Loader::loadModels($this, ['Domains.DomainsTlds']);

            $tld = $this->DomainsTlds->getByPackage($packageId);

            if (isset($tld->tld)) {
                $fields['_data']['item_type'] = 'domain';
            }
        } catch (Throwable $e) {
            // Nothing to do
        }

With

        Loader::loadModels($this, ['PluginManager']);
        if ($this->PluginManager->isInstalled('domains', \Configure::get('Blesta.company_id'))) {
            Loader::loadModels($this, ['Domains.DomainsTlds']);

            $tld = $this->DomainsTlds->getByPackage($packageId);
            if (isset($tld->tld)) {
                $fields['_data']['item_type'] = 'domain';
            }
        }



In core/Pricing/Presenter/Items/Service/ServiceItems.php around line 118 replace:

        try {
            Loader::loadModels($this, ['Domains.DomainsTlds']);

            $tld = $this->DomainsTlds->getByPackage($packageId);

            if (isset($tld->tld)) {
                $fields['_data']['item_type'] = 'domain';
            }
        } catch (Throwable $e) {
            // Nothing to do
        }

With

        Loader::loadModels($this, ['PluginManager']);
        if ($this->PluginManager->isInstalled('domains', \Configure::get('Blesta.company_id'))) {
            Loader::loadModels($this, ['Domains.DomainsTlds']);

            $tld = $this->DomainsTlds->getByPackage($packageId);
            if (isset($tld->tld)) {
                $fields['_data']['item_type'] = 'domain';
            }
        }

 

Link to comment
Share on other sites

26 minutes ago, Kurogane said:

How to install Domain Manager Plugin? at least version 4 not exist not sure if version 5.0 you add it.

How is suppose to install 4.x to 5.1.0.

If you install 5.1 fresh you'll have the domain manager. If you upgrade to 5.1, then you need to install the domain manager under Settings > Company > Plugins > Available. If upgrading to 5.1.0 you should install the domain manager or you'll experience the above mentioned bug. That will be resolved in 5.1.1 so that it's not required to be installed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...