Project

General

Profile

Actions

Bug #54843

closed

SuggestElement: support for PAGE_TSCONFIG_*-values in addWhere

Added by Julian Hofmann over 10 years ago. Updated over 5 years 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']), 
        )
    );
}

Actions #1

Updated by Wouter Wolters over 10 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

Actions #2

Updated by Gerrit Code Review over 10 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

Actions #3

Updated by Gerrit Code Review over 10 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

Actions #4

Updated by Markus Klein almost 10 years ago

  • Complexity changed from no-brainer to easy

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

Actions #5

Updated by Gerrit Code Review almost 10 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

Actions #6

Updated by Markus Klein almost 10 years ago

  • Tracker changed from Feature to Bug
Actions #7

Updated by Gerrit Code Review almost 10 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

Actions #8

Updated by Gerrit Code Review almost 10 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

Actions #9

Updated by Gerrit Code Review almost 10 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

Actions #10

Updated by Gerrit Code Review almost 10 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

Actions #11

Updated by Julian Hofmann almost 10 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF