Bug #54843

SuggestElement: support for PAGE_TSCONFIG_*-values in addWhere

Added by Julian Hofmann almost 5 years ago. Updated 16 days ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-01-08
Due date:
% Done:

100%

Estimated time:
0.25 h
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Using PAGE_TSCONFIG_*-values in the foreign_table_where-clause will limit the entries. In combination with using a suggest wizard this doesn't work. So at the moment you have the choice to
  • not limiting the entries in the selectbox but to limit it in the suggest wizard
  • limiting the entries in the selectbox but no results in the suggest wizard (due to an replaced marker)

In there any reason why only THIS_UID and CURRENT_PID are replaced?

if (isset($config['addWhere'])) {
    $config['addWhere'] = strtr(
        ' ' . $config['addWhere'],
        array(
            '###THIS_UID###' => intval($uid),
            '###CURRENT_PID###' => intval($pageId),
        )
    );
}

This would fix it:

if (isset($config['addWhere'])) {
    $config['addWhere'] = strtr(' ' . $config['addWhere'], 
        array(
            '###THIS_UID###' => intval($uid),
            '###CURRENT_PID###' => intval($pageId),
            '###PAGE_TSCONFIG_ID###' => intval($TSconfig['TCEFORM.'][$table . '.'][$field . '.']['PAGE_TSCONFIG_ID']),
            '###PAGE_TSCONFIG_IDLIST###' => $GLOBALS['TYPO3_DB']->cleanIntList($TSconfig['TCEFORM.'][$table . '.'][$field . '.']['PAGE_TSCONFIG_IDLIST']),
            '###PAGE_TSCONFIG_STR###' => $GLOBALS['TYPO3_DB']->quoteStr($TSconfig['TCEFORM.'][$table . '.'][$field . '.']['PAGE_TSCONFIG_STR'], $fieldConfig['foreign_table']), 
        )
    );
}

Associated revisions

Revision 02a6a083 (diff)
Added by Julian Hofmann over 4 years ago

[BUGFIX] Suggest Wizard: support for PAGE_TSCONFIG_*-values in addWhere

Using PAGE_TSCONFIG_*-values in the foreign_table_where-clause limits
the entries. This where clause is also used for the suggest wizard, but
the markers are not replaced there.
PAGE_TSCONFIG_*-values are now supported in the suggest wizard too.

Resolves: #54843
Releases: 6.3, 6.2
Documentation: #60160
Change-Id: Ieb53d48ca0ddf22bbbbc4aed4d1e83220a82ec09
Reviewed-on: https://review.typo3.org/26695
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters

Revision ba4b915f (diff)
Added by Julian Hofmann over 4 years ago

[BUGFIX] Suggest Wizard: support for PAGE_TSCONFIG_*-values in addWhere

Using PAGE_TSCONFIG_*-values in the foreign_table_where-clause limits
the entries. This where clause is also used for the suggest wizard, but
the markers are not replaced there.
PAGE_TSCONFIG_*-values are now supported in the suggest wizard too.

Resolves: #54843
Releases: 6.3, 6.2
Documentation: #60160
Change-Id: Ieb53d48ca0ddf22bbbbc4aed4d1e83220a82ec09
Reviewed-on: https://review.typo3.org/31465
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters

History

#1 Updated by Wouter Wolters almost 5 years ago

I see you have already a solution, can you come up with a patch?
For information how to contribute: http://wiki.typo3.org/CWT

#2 Updated by Gerrit Code Review almost 5 years ago

  • Status changed from New 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 https://review.typo3.org/26695

#3 Updated by Gerrit Code Review almost 5 years ago

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

#4 Updated by Markus Klein over 4 years ago

  • Complexity changed from no-brainer to easy

Is this really a feature? I tend to call it a bugfix.

#5 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 https://review.typo3.org/26695

#6 Updated by Markus Klein over 4 years ago

  • Tracker changed from Feature to Bug

#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 https://review.typo3.org/26695

#8 Updated by Gerrit Code Review over 4 years ago

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

#9 Updated by Gerrit Code Review over 4 years ago

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

#10 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 https://review.typo3.org/31465

#11 Updated by Julian Hofmann over 4 years ago

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

#12 Updated by Benni Mack 16 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF