Bug #24591

Editing be_groups references non-existant file typo3/gfx/empty-empty

Added by Steffen Gebert almost 9 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2011-01-15
Due date:
% Done:

100%

TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Somewhere in the middle of the sprites for TCEforms a bug seems to be introduced:

The entries in the select for be_groups (while editing a be_group) has gfx/empty-empty as background-image defined.

This results in Error 404

(issue imported from #M17056)

Screen shot 2011-01-15 at 17.36.34.png View (91.5 KB) Administrator Admin, 2011-01-15 17:37

patch_reverse_13245.diff View (1.29 KB) Administrator Admin, 2011-02-04 17:55

patch_17056.diff View (1.06 KB) Administrator Admin, 2011-02-04 21:01

rfc0017056_v2.diff View (2.9 KB) Administrator Admin, 2011-02-07 11:39

rfc0017056_v3.diff View (2.89 KB) Administrator Admin, 2011-02-07 12:15

24591_v4.diff View (3.07 KB) Andreas Wolf, 2011-09-29 22:28

Associated revisions

Revision 44a81cd0 (diff)
Added by Peter Niederlag(office) about 8 years ago

[BUGFIX] skip missing icons in tceforms select options

check existance of file before adding background style url

Change-Id: Ie5db6d6a6b6b7ccdd5772a829be0ca236787cd9a
Fixes: #24591
Releases: 4.5, 4.6
Reviewed-on: http://review.typo3.org/5394
Reviewed-by: Björn Pedersen
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Philipp Gampe
Reviewed-by: Stefan Neufeind
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers

Revision 41311d59 (diff)
Added by Peter Niederlag(office) about 8 years ago

[BUGFIX] Skip missing icons in tceforms select options

Check existance of file before adding background style url

Change-Id: I78619069090d7af64b858f93b9d7fedeb8014324
Fixes: #24591
Releases: 4.5, 4.6
Reviewed-on: http://review.typo3.org/5887
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers

History

#1 Updated by Sascha no-lastname-given almost 9 years ago

It took some time to went though t3lib/class.t3lib_tceforms.php but i found the problem that appears in users, groups and file_mounts.

With revision 9966 there was a change in config_default.php and tbl_be.php:
http://forge.typo3.org/projects/typo3v4-core/repository/revisions/9966/

The problem here is to remove such lines within these elements:
'renderMode' => $GLOBALS['TYPO3_CONF_VARS']['BE']['accessListRenderMode']

The "renderMode" config doesn't appear in TCA anymore. But it's necessary within class.t3lib_tceforms.php to avoid an empty-empty image and this funny url.

-> I added a patch just to shows the old lines, BUT it would bring back a checkbox!

Sascha ;-)

#2 Updated by Sascha no-lastname-given almost 9 years ago

This would always end in "empty-empty":

if ($iField && $iPath && $row[$iField]) {
$iParts = t3lib_div::trimExplode(',', $row[$iField], 1);
$icon = '../' . $iPath . '/' . trim($iParts0);
} elseif (t3lib_div::inList('singlebox,checkbox', $fieldValue['config']['renderMode'])) {
$icon = t3lib_iconWorks::mapRecordTypeToSpriteIconName($f_table, $row);
} else {
$icon = 'empty-empty';
}

#3 Updated by Steffen Gebert almost 9 years ago

Thanks for investigating!

I think renderMode => 'singlebox' would restore the old value. However I don't think that fixes the problem itself (it just would not occur in this place anymore ;)).

Without digging deeper into it, empty-empty has to be replaced with path to clear.gif (or sth. better).

#4 Updated by Sascha no-lastname-given almost 9 years ago

What do you think about the patch? I didn't delete anything, its just catches empty-empty.

#5 Updated by Steffen Gebert almost 9 years ago

I've just pointed SteffenR to this issue, who is probably responsible for this feature ^^.

I don't know, what this code should do in detail and under what circumstances the first option returning a path in icon is chosen. They're somehow contrary to each other.

#6 Updated by Steffen Ritter almost 9 years ago

Hello Sascha,
thanks for your contribution.
Anyways your patch "fixes" the wrong place.

Even the code you quoted, where empy empty is set is correct.

As you see, the function getIcon is called with an SpriteIcon name. This never should happen. getIcon is the "old" function.
Therefore the call itself would have to be fixed. Have a look at the attached patch...

#7 Updated by Sascha no-lastname-given almost 9 years ago

Hey Steffen,
iam new to the core files. These patches are my first stepp into this world. Hope that this helps instead of confusing other developers. I check your patch and found two missing brackets at the end of "if(is_file....". By the way, nice solution :-).

#8 Updated by Steffen Gebert almost 9 years ago

Of course, you help and your contributions are welcome!

#9 Updated by Steffen Ritter almost 9 years ago

missing brackets at the end of "if(is_file....".

ah right :)
hacked this locally ... if it works for you - we/I can go to core list ...

#10 Updated by Steffen Ritter almost 9 years ago

@Sascha: is this working for you as you expectext

#11 Updated by Sascha no-lastname-given almost 9 years ago

It removes the style from such "options" (empty-empty). For me this patch works fine :-)

#12 Updated by Steffen Ritter almost 9 years ago

thanks Sascha, I put it to the core list

#13 Updated by Mr. Hudson about 8 years ago

Patch set 1 of change Ie5db6d6a6b6b7ccdd5772a829be0ca236787cd9a has been pushed to the review server.
It is available at http://review.typo3.org/5394

#14 Updated by Chris topher about 8 years ago

  • Status changed from Accepted to Under Review
  • Target version deleted (0)

#15 Updated by Mr. Hudson about 8 years ago

Patch set 2 of change Ie5db6d6a6b6b7ccdd5772a829be0ca236787cd9a has been pushed to the review server.
It is available at http://review.typo3.org/5394

#16 Updated by Andreas Wolf about 8 years ago

I ported Steffen Ritter's patch to the most recent master revision. As Peter Niederlag proposed a completely different approach on Gerrit, I would let Steffen decide if this patch is good enough or if we should use Steffens and my version.

#17 Updated by Anonymous about 8 years ago

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

#18 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF