Author Topic: #0 Call to undefined function vmdebug() ERROR  (Read 1915 times)

hazael

  • Beginner
  • *
  • Posts: 38
    • Bi┼╝uteria etniczna i orientalna
  • VirtueMart Version: 3.6.8
Re: #0 Call to undefined function vmdebug() ERROR
« Reply #15 on: November 05, 2019, 23:18:33 pm »
Have you enabled SEO in the VM configuration?
This problem occurs when SEO is inactive.

DayCounts

  • Beginner
  • *
  • Posts: 20
  • DayCounts.com, your Virtuemart expert
    • DayCounts.com
Re: #0 Call to undefined function vmdebug() ERROR
« Reply #16 on: November 05, 2019, 23:45:29 pm »
I confirm. BeakDesign custom field for all breaks the product detail page.
Disabling the system plugin "Base Custom Fields for All" fixes the issue. However if you have some custom field for all fields they will not load properly.

eliotrayner

  • Beginner
  • *
  • Posts: 8
  • VirtueMart Version: VM3.6.8
Re: #0 Call to undefined function vmdebug() ERROR
« Reply #17 on: November 07, 2019, 13:09:33 pm »
I just updated to VM3.6.8.10197 and site is working apart from single product pages. I get the following error:

Quote
Call to undefined function vmdebug() in file: administrator\components\com_virtuemart\helpers\vmlanguage.php line: 274

As @DayCounts points out Disabling the system plugin "Base Custom Fields for All" fixes the issue. However if you have some custom field for all fields they will not load properly.

The error is in plugins\system\customfieldsforallbase\bootstrap.php, which needs VmConfig::loadConfig();

The following fixes the issue for me. Change ~ lines 3-10 ...

Quote
if (! class_exists('\vmDefines')) {
    require_once (JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_virtuemart' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'config.php');
    //Virtuemart changes the file structure in 3.4.3 for vmDefines
    if (! class_exists('\vmDefines')) {
        require_once (JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_virtuemart' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'vmdefines.php');
    }
    \vmDefines::defines();
}

to

Quote
if (! class_exists('\vmDefines')) {
    require_once (JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_virtuemart' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'config.php');
   VmConfig::loadConfig();
    //Virtuemart changes the file structure in 3.4.3 for vmDefines
    if (! class_exists('\vmDefines')) {
        require_once (JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_virtuemart' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'vmdefines.php');
    }
    \vmDefines::defines();
}

This change does not work prior to VM3.6.x

Dudebaker

  • Beginner
  • *
  • Posts: 6
Re: #0 Call to undefined function vmdebug() ERROR
« Reply #18 on: November 11, 2019, 16:44:08 pm »
Through this fix the error message disappears and the shop works again but the multilanguage-support is then broken.
For example the text "Sort by Ordering" or "Add to cart" will stay at the default shop language.

Debug with this workaround:
1 vmdebug 5 Languages, default shoplanguage (VmConfig::$jDefLang): de_de de-DE Selected VM language (VmConfig::$vmlang): de_de de-DE SEF: de $lfbs =

Debug with disabled plugin:
1 vmdebug 5 Languages, default shoplanguage (VmConfig::$jDefLang): de_de de-DE Fallback language (VmConfig::$defaultLang): de_de Selected VM language (VmConfig::$vmlang): en_gb en-GB SEF: en $lfbs =

As we can see, the selected vm language (en_gb) is not listed and vm uses the default language (de_de).

I didn't find an other way to fix this - we will have to wait for breakdesigns to fix this or maybe someone else has a hint?

balai

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1385
Re: #0 Call to undefined function vmdebug() ERROR
« Reply #19 on: November 12, 2019, 02:12:28 am »
Guys we will look at that the next days and will provide some feedback.

balai

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1385
Re: #0 Call to undefined function vmdebug() ERROR
« Reply #20 on: Yesterday at 14:09:20 »
Update:
A new version of Custom Fields For All is released with a fix included (v. 4.0.5).
Anyone using VM 3.6.8 and higher is urged to update his version.