CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #31787

Problems working with pages table and pid

Added by ian no-lastname-given over 1 year ago. Updated 11 months ago.

Status:Closed Start date:2011-11-13
Priority:Should have Due date:
Assignee:Francois Suter % Done:

100%

Category:Import process
Target version:2.0.0
Votes: 0

Description

Hi :)

in my scenario I have to import categories and sub-categories from an external source (MSSQL) and convert them in the related pages and sub-pages.

I found 2 bugs in this scenario and I provided a patch.

BUG 1.
Since there are already pages in this TYPO3 installation, there is a small problem because these already existing records (pages) have no reference with the external source. Their reference_uid = '0'.
These not referenced pages must survive the external source import and I can't disable delete operations because I need that future external deletions will be mirrored.

A simple check in getExistingUids() and getMapping() should solve the problem. (see attached patch)

BUG 2.
Since I need that sub-categories and their parents will match sub-pages and their parents pages, I have to work with "pid" column in external informations. But $theRecord['pid'] is overwritten in function "storeData" by $this->pid.

Same here, a simple check should fix the bug. (see attached patch).

I hope that this helps and thanks a lot for the amazing "Tesseract Project" :)

pages-scenario.diff (2.1 kB) ian no-lastname-given, 2011-11-13 16:30

Associated revisions

Revision 62913
Added by Francois Suter 12 months ago

Added check to avoid overwriting imported records' pid, references #31787

Revision 62913
Added by Francois Suter 12 months ago

Added check to avoid overwriting imported records' pid, references #31787

Revision 62914
Added by Francois Suter 12 months ago

Added check to use only records with non-empty external references in mapping, resolves #31787

Revision 62914
Added by Francois Suter 12 months ago

Added check to use only records with non-empty external references in mapping, resolves #31787

History

Updated by Francois Suter over 1 year ago

  • Category set to Import process
  • Status changed from New to Accepted
  • Assignee set to Francois Suter

The changes you suggest seem to make sense, thanks for providing a patch.

About the handling of the empty reference_uid I'll have to check it further. I think that this behavior should be made configurable, if only because it changes the current behavior.

BTW I hope you're not in too much of a hurry, because I don't have much time to devote to external_import these. And thanks for the reference to Tesseract, it's nice to get a bit of feedback.

Updated by Francois Suter 12 months ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r62914.

Updated by Francois Suter 11 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF