?
avatar gslitt91
gslitt91
15 Oct 2018

I tried to file bug in joomla core lib "JDatabaseImporterMysqli" . But not able to.

Here are bug details in function mergeStructure

it only merges first table structure .
This code "if ($queries = $this->getAlterTableSql($xml->database->table_structure))" has problem .

Solutuion: Change it to this "if ($queries = $this->getAlterTableSql($table)) {" .

If you feel there's a bug in Joomla, please report it using the following process:
http://docs.joomla.org/Filing_bugs_and_issues

Let us know if you have any questions.

Thanks!

Kind regards,
Nick

Originally posted by @nicksavov in #694 (comment)

avatar gslitt91 gslitt91 - open - 15 Oct 2018
avatar joomla-cms-bot joomla-cms-bot - change - 15 Oct 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Oct 2018
avatar brianteeman
brianteeman - comment - 15 Oct 2018

No idea what this relates to - closed

avatar brianteeman brianteeman - change - 15 Oct 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-10-15 08:31:10
Closed_By brianteeman
avatar brianteeman brianteeman - close - 15 Oct 2018
avatar ggppdk
ggppdk - comment - 15 Oct 2018

SPAM by bot

avatar gslitt91
gslitt91 - comment - 16 Oct 2018

No idea what this relates to - closed

https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/database/importer.php this file has issue at line 190 .

avatar gslitt91
gslitt91 - comment - 16 Oct 2018

steps to reproduce

  1. Export here is code for export
    require_once JPATH_COMPONENT . '/lib/importer.php';
    $database = JFactory::getDBO();
    $tables = $database->getTableList();
    $prefix = $database->getPrefix();
    $dt_tables = [];
    foreach ($tables as $table) {
    if (strpos($table, "dtsms") !== false) {
    $dt_tables[] = $table;
    }
    }
    $schema = [];
    $cnt = 1;

       $exporter = new JDatabaseExporterMysqli();
       $exporter->setDbo($database);
       $exporter->from($dt_tables);
       echo $exporter->__toString(); 
    
avatar gslitt91
gslitt91 - comment - 16 Oct 2018

While importing from same xml only imports first table

avatar ggppdk
ggppdk - comment - 16 Oct 2018

What about the title of this issue "Hi Bruno"

avatar gslitt91
gslitt91 - comment - 16 Oct 2018

Sorry posting first time . So just replied from other issue . let me edit title

avatar gslitt91 gslitt91 - change - 16 Oct 2018
Title
Hi Bruno,
Database import lib only imports first table
avatar gslitt91 gslitt91 - edited - 16 Oct 2018

Add a Comment

Login with GitHub to post a comment