Bug #60226

Content Element header_link to a page also adds a references to the file with same id

Added by Thomas West over 5 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2014-07-10
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Stabilization Sprint

Description

When adding a page link to a content elements header_link field the file with corresponding uid is 'referenced' too. The file is not actually used but it can not be deleted anymore.

  • Upload image to fileadmin. e.g the image has uid=1
  • Add any type of content element to a page and add a header link to page pid=1 with the link wizard in the header section.
  • Then check the info of the image in the filelist. There will be an entry in 'References to this item:'

See attached screenshots

Happens in Typo3 6.2.3 and 6.2.4

header_link_bug.jpg View - filelist and content element header (52.5 KB) Thomas West, 2014-07-10 11:06

header_link_bug_2.jpg View - image info (110 KB) Thomas West, 2014-07-10 11:06


Related issues

Related to TYPO3 Core - Bug #60919: References to files are sometimes wrong Closed 2014-08-12
Related to TYPO3 Core - Bug #65126: Refindex not correctly updated for flexform fields Closed 2015-02-17
Related to TYPO3 Core - Bug #65214: Failing functional test exportPagesAndRelatedTtContent Rejected 2015-02-21
Related to TYPO3 Core - Bug #65358: file://* links not accessible Closed 2015-02-26
Related to TYPO3 Core - Bug #66243: File links in RTE don't get counted as a reference since TYPO3 6.2.11 Closed 2015-04-02
Related to TYPO3 Core - Bug #65626: References in the filelist show all references to an ID Closed 2015-03-09

Associated revisions

Revision 7dfd4607 (diff)
Added by Nicole Cordes over 4 years ago

[BUGFIX] Prevent wrong ref_index for fields with soft references

If you add a page link to a field which is defined as softrefs, the
ReferenceIndex creates an index to a FAL record if there exists a file
record with the page id. As file links are always prefixed with 'file:'
this patch adds a proper check before generating a file ref_index.

Furthermore if you add a file or folder link, the field is referenced
twice for the FAL record. So we have to suppress the softreference for
those records.

Releases: master, 6.2
Resolves: #60226
Change-Id: Ieb9179d393e23eda4fdb1bb47ba4693bd92e75d9
Reviewed-on: http://review.typo3.org/37016
Reviewed-by: Wouter Wolters <>
Reviewed-by: Mathias Schreiber <>
Tested-by: Mathias Schreiber <>
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>

Revision 91732f29 (diff)
Added by Nicole Cordes over 4 years ago

[BUGFIX] Prevent wrong ref_index for fields with soft references

If you add a page link to a field which is defined as softrefs, the
ReferenceIndex creates an index to a FAL record if there exists a file
record with the page id. As file links are always prefixed with 'file:'
this patch adds a proper check before generating a file ref_index.

Furthermore if you add a file or folder link, the field is referenced
twice for the FAL record. So we have to suppress the softreference for
those records.

Releases: master, 6.2
Resolves: #60226
Change-Id: Ieb9179d393e23eda4fdb1bb47ba4693bd92e75d9
Reviewed-on: http://review.typo3.org/37077
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>

Revision 0064da7f (diff)
Added by Nicole Cordes over 4 years ago

[BUGFIX] Prevent wrong ref_index for fields with soft references

If you add a page link to a field which is defined as softrefs, the
ReferenceIndex creates an index to a FAL record if there exists a file
record with the page id. As file links are always prefixed with 'file:'
this patch adds a proper check before generating a file ref_index.

Because the functional tests of impexp extension still use a hardcoded
file path for the header_link field the patch corrects the value to
refer to a file.

Furthermore if you add a file or folder link, the field is referenced
twice for the FAL record. So we have to suppress the softreference for
those records.

Releases: master, 6.2
Resolves: #60226
Change-Id: I969224e2a291491cb7ece1f61b375071bf0eaebc
Reviewed-on: http://review.typo3.org/37086
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>
Reviewed-by: Andreas Fernandez <>
Reviewed-by: Göran Bodenschatz <>
Reviewed-by: Wouter Wolters <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

Revision f47d624b (diff)
Added by Nicole Cordes over 4 years ago

[BUGFIX] Prevent wrong ref_index for fields with soft references

If you add a page link to a field which is defined as softrefs, the
ReferenceIndex creates an index to a FAL record if there exists a file
record with the page id. As file links are always prefixed with 'file:'
this patch adds a proper check before generating a file ref_index.

Because the functional tests of impexp extension still use a hardcoded
file path for the header_link field the patch corrects the value to
refer to a file.

Furthermore if you add a file or folder link, the field is referenced
twice for the FAL record. So we have to suppress the softreference for
those records.

Releases: master, 6.2
Resolves: #60226
Change-Id: I969224e2a291491cb7ece1f61b375071bf0eaebc
Reviewed-on: http://review.typo3.org/37372
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

Revision 2d33ba81 (diff)
Added by Nicole Cordes over 4 years ago

[FOLLOWUP][BUGFIX] Prevent wrong ref_index for fields with soft references

Prevent problems with NULL values in reference fields.

Releases: master, 6.2
Resolves: #60226
Change-Id: I168e508ca9d47a3047a7b11bed0c315186ff2e2a
Reviewed-on: http://review.typo3.org/37511
Reviewed-by: Stephan Großberndt <>
Reviewed-by: Nicole Cordes <>
Tested-by: Nicole Cordes <>
Reviewed-by: Wouter Wolters <>
Reviewed-by: Markus Klein <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>
Reviewed-by: Mateusz Wojtuła <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision 0ba442bf (diff)
Added by Nicole Cordes over 4 years ago

[FOLLOWUP][BUGFIX] Prevent wrong ref_index for fields with soft references

Prevent problems with NULL values in reference fields.

Releases: master, 6.2
Resolves: #60226
Change-Id: I168e508ca9d47a3047a7b11bed0c315186ff2e2a
Reviewed-on: http://review.typo3.org/37554
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>
Reviewed-by: Nicole Cordes <>
Tested-by: Nicole Cordes <>

History

#1 Updated by David Lemaitre almost 5 years ago

I can confirm this issue still exists with 6.2.9

#2 Updated by Markus Klein over 4 years ago

  • Target version set to next-patchlevel
  • Sprint Focus set to Stabilization Sprint

#3 Updated by Nicole Cordes over 4 years ago

  • Status changed from New to In Progress
  • Assignee set to Nicole Cordes

#4 Updated by Gerrit Code Review over 4 years ago

  • Status changed from In Progress to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37016

#5 Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37016

#6 Updated by Gerrit Code Review over 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37016

#7 Updated by Gerrit Code Review over 4 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37016

#8 Updated by Gerrit Code Review over 4 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37077

#9 Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37077

#10 Updated by Nicole Cordes over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#11 Updated by Nicole Cordes over 4 years ago

  • Status changed from Resolved to Accepted

#12 Updated by Gerrit Code Review over 4 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37086

#13 Updated by Gerrit Code Review over 4 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37372

#14 Updated by Nicole Cordes over 4 years ago

  • Status changed from Under Review to Resolved

#15 Updated by Gerrit Code Review over 4 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37511

#16 Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37511

#17 Updated by Gerrit Code Review over 4 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37554

#18 Updated by Nicole Cordes over 4 years ago

  • Status changed from Under Review to Resolved

#19 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF