Bug #24591
closedEditing be_groups references non-existant file typo3/gfx/empty-empty
100%
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)
Files
Updated by Sascha no-lastname-given almost 14 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 ;-)
Updated by Sascha no-lastname-given almost 14 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';
}
Updated by Steffen Gebert almost 14 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).
Updated by Sascha no-lastname-given almost 14 years ago
What do you think about the patch? I didn't delete anything, its just catches empty-empty.
Updated by Steffen Gebert almost 14 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.
Updated by Steffen Ritter almost 14 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...
Updated by Sascha no-lastname-given almost 14 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 :-).
Updated by Steffen Gebert almost 14 years ago
Of course, you help and your contributions are welcome!
Updated by Steffen Ritter almost 14 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 ...
Updated by Steffen Ritter almost 14 years ago
@Sascha: is this working for you as you expectext
Updated by Sascha no-lastname-given almost 14 years ago
It removes the style from such "options" (empty-empty). For me this patch works fine :-)
Updated by Steffen Ritter almost 14 years ago
thanks Sascha, I put it to the core list
Updated by Mr. Hudson about 13 years ago
Patch set 1 of change Ie5db6d6a6b6b7ccdd5772a829be0ca236787cd9a has been pushed to the review server.
It is available at http://review.typo3.org/5394
Updated by Chris topher about 13 years ago
- Status changed from Accepted to Under Review
- Target version deleted (
0)
Updated by Mr. Hudson about 13 years ago
Patch set 2 of change Ie5db6d6a6b6b7ccdd5772a829be0ca236787cd9a has been pushed to the review server.
It is available at http://review.typo3.org/5394
Updated by Andreas Wolf about 13 years ago
- File 24591_v4.diff 24591_v4.diff added
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.
Updated by Anonymous about 13 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 44a81cd0cd202474b3719c1b01be476d600a9def.