Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix imports #30436

Open
wants to merge 1 commit into
base: 18.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions htdocs/core/modules/import/import_csv.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -929,9 +929,9 @@ public function import_insert($arrayrecord, $array_match_file_to_database, $obji
// Note: For extrafield tablename, we have in importfieldshidden_array an enty 'extra.fk_object'=>'lastrowid-tableparent' so $keyfield is 'fk_object'
$sqlSelect = "SELECT rowid FROM ".$tablename;

if (empty($keyfield)) {
//if (empty($keyfield)) { keyfield may content any hidden update field !!!
Copy link
Member

@eldy eldy Jul 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which value of keyfield did yo get.
Also can you describe the process to reproduce the bug with example of selected/entered values ?
Do you experience the trouble in v19 ?

$keyfield = 'rowid';
}
//}
$sqlSelect .= " WHERE ".$keyfield." = ".((int) $lastinsertid);

if (!empty($tablewithentity_cache[$tablename])) {
Expand Down Expand Up @@ -974,9 +974,9 @@ public function import_insert($arrayrecord, $array_match_file_to_database, $obji
}
$sqlstart .= " SET ".implode(', ', $set);

if (empty($keyfield)) {
//if (empty($keyfield)) { keyfield may content any hidden update field !!!
$keyfield = 'rowid';
}
//}
$sqlend = " WHERE ".$keyfield." = ".((int) $lastinsertid);

if ($is_table_category_link) {
Expand Down
Loading