update 3.2.12 to 3.2.14 fails "use MySQLi" but site is using MySQLi ?!

Started by carsten888, December 31, 2018, 11:10:05 AM

Previous topic - Next topic

carsten888

I'm trying to update my live site from 3.2.12 to 3.2.14.
I get this warning:
Quote
To ensure seemless working with Virtuemart please use MySQLi as database type in Joomla configuration
Extension Update: Custom install routine failure.
But in the joomla config the database IS using mysqli.

How to proceed?

I got an exact copy of the site on localhost and had no problem doing the update.   :o

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

carsten888

php 7.1.25-1
J 3.8.12
Quoteand why 3.2.14?
because that is the latest version according to Joomla update.
So I emptied the cache and tried again, now its version 3.4.2. But when trying to update I get the same error.


jenkinhill

ISTR Milbo mentioned that the latest VM version is for Joomla 3.9  (now at 3.9.1)
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

carsten888


carsten888

solved! Bug in Joomla core.

How wierd. In the Joomla config at 'database type' 'mysqli' was selected. But in the configuration.php
public $dbtype = 'mysql';
I changed that to
public $dbtype = 'mysqli';
and had no problem updating vm.

GJC Web Design

oddly I had exactly this problem yesterday with a site upgrade...
and this is the weird part...

In Joomla admin config it clearly showed mysqli  in the dropdown but VM still said mysql on install.
The installer takes this directly from the configuration.php

      $config = JFactory::getConfig();
      $type = $config->get( 'dbtype' );
      if ($type != 'mysqli' and $type!= 'Jdiction_mysqli') {
         JFactory::getApplication()->enqueueMessage('To ensure seemless working with Virtuemart please use MySQLi as database type in Joomla configuration', 'warning');
         return false;
      }

when I checked the configuration.php by ftp it did say public $dbtype = 'mysql';

I have no idea how this can be possible but manually changing this to public $dbtype = 'mysqli'; and the upgrade worked fine

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

carsten888


GJC Web Design

almost as if Joomla doesn't read the states directly from configuration.php but stores them elsewhere .. can't find anything like this though (DB or xmls etc)

but the problem is repeatable

just changed and saved the config but it doesn't change in JAdmin -- no caches etc configged..

hmmmm

debugging directly in administrator\components\com_config\model\application.php the correct state is shown but the select still doesn't update

and directly at the form template still shows wrong even though $this is correct  [dbtype] => mysql

administrator\components\com_config\view\application\tmpl\default_database.php

ah....  there is no mysql value

<select id="jform_dbtype" name="jform[dbtype]" style="display: none; font-family: Arial;">
   <option value="mysqli" style="font-family: Arial;">MySQLi</option>
   <option value="pgsql" style="font-family: Arial;">PostgreSQL (PDO)</option>
   <option value="pdomysql" selected="selected" style="font-family: Arial;">MySQL (PDO)</option>
   <option value="postgresql" style="font-family: Arial;">PostgreSQL</option>
</select>

so if config is set to mysql it just defaults to the 1st one which is mysqli
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

carsten888

Good debugging!  :)

You might want report that bug. If only for all the VM users.

Milbo

I think for all joomla users also. Sounds really like a joomla bug.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

The problem is perhaps because mysql is already saved before upgrade
mysql was and continue to be a valid choice on Joomla 4, if i read correctly.
In latest built : https://github.com/joomla/joomla-cms/blob/ad2c673ac27c2fd19bbdf6003aee0451d068de16/installation/forms/setup.xml
<field
         name="db_type"
         type="databaseconnection"
         label="INSTL_DATABASE_TYPE_DESC"
         id="db_type"
         class="custom-select form-control"
         supported="mysql,mysqli,pgsql,postgresql"
         required="true"
         default="mysqli"
         filter="string"
      />