Project

General

Profile

Actions

Bug #15429

closed

Type selectbox doesn't set the correct content type when CType options is reduced.

Added by Peter Klein almost 19 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2006-01-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

On a sysFolder in my site I have the following PAGE TSConfig, which removes various fields from tt_content. (I only need the IMAGE type, with 2 fields: Image & Link)

TCEFORM.tt_content {
CType.removeItems = header,text,textpic,bullets,table,uploads,multimedia,mailform,search,login,menu,shortcut,list,html,splash,script,div,templavoila_pi1,templavoila_pi2
CType.disableNoMatchingValueElement=1

sys_language_uid.disabled = 1
colPos.disabled = 1
spaceBefore.disabled = 1
spaceAfter.disabled = 1
section_frame.disabled = 1
sectionIndex.disabled = 1
linkToTop.disabled = 1
header_position.disabled = 1
header_layout.disabled = 1
header_link.disabled = 1
date.disabled = 1
imageorient.disabled = 1
imagecols.disabled = 1
image_noRows.disabled = 1
imageborder.disabled = 1
imagewidth.disabled = 1
imageheight.disabled = 1
image_zoom.disabled = 1
image_compression.disabled = 1
image_effects.disabled = 1
imagecaption.disabled = 1
imagecaption_position.disabled = 1
fe_group.disabled = 1
}

The problem is that when I remove all other content types from the selectbox (The CType.removeItems line), I get a "CURRENT VALUE IS NOT AVAILABLE" option in the selectbox. According to the manual:
http://typo3.org/documentation/document-library/doc_core_tsconfig/gt_TCEFORM/
Then the following code "CType.disableNoMatchingValueElement=1" remove that msg and the selector box will default to the first element in the selector box. All that works, BUT the element form displayed is the TEXT element, and not the first element (IMAGE).
(And since the selectbox only has one element (Image), it is not possible to change the type.)
The correct behaviour would be to display the IMAGE object (or whatever object is first in the list), and not the TEXT object (specially if it has been disabled!)

(issue imported from #M2286)


Files

2286.patch (659 Bytes) 2286.patch Administrator Admin, 2006-06-19 16:44
Actions #1

Updated by Wolfgang Klinger almost 19 years ago

.. the form shows the fields for the type you selected in the wizard the page before, if you select "Bullet list" there you'll get the bullet list fields.

Actions #2

Updated by Peter Klein almost 19 years ago

I know that, and that is working too, but if I create the contentelement from the List module, using the "Create new record" link, and then click on the "Pagecontent" link (Not the wizard link), then it incorrectly shows the fields from the TEXT element (bodytext/RTE etc.) except for the type, which correctly shows "Image".
(All other elements, except "IMAGE" has been disabled on the page, using the above PAGE TSConfig)

Actions #3

Updated by Andreas Wolf over 18 years ago

I can confirm this issue. The problem seems to lie in t3lib_transferdata::renderRecordRaw. This function processes the values from a row for backend-display - or, with new records, loads the default values from TCA.
It would be necessary to insert a condition that checks if the default value is applicable - at least for the field "type". I have written a small patch that checks for alternative values if the field is CType and fields are excluded via TSconfig.

Actions #4

Updated by Peter Klein almost 16 years ago

The patch doesn't fix the problem, as in TYPO3 4.2.2 it shows only the General tab. The media tab is gone, and only appear when you save the element.

Is any core developers still reading/using the bugtracker?

2.5+ years after reporting the bug, and the bug is still present..

Actions #5

Updated by Andreas Wolf about 13 years ago

  • Category set to Backend User Interface
  • Assignee set to Andreas Wolf
  • Target version changed from 0 to 4.6.0
  • TYPO3 Version changed from 3.8.1 to 4.6
  • PHP Version deleted (4)

This issue is still valid; the problem is most obviously that the default record data is not corrected when displaying a new record.

A general fix would involve checking the type field of each record (not only CType) and doing this before starting to render a record; for existing records the type should IMHO not be changed automatically, but an error should be displayed instead.

Actions #6

Updated by Chris topher about 13 years ago

  • Target version changed from 4.6.0 to 4.6.1
Actions #7

Updated by Chris topher almost 13 years ago

  • Target version changed from 4.6.1 to 4.6.2
Actions #8

Updated by Xavier Perseguers almost 13 years ago

  • Assignee deleted (Andreas Wolf)
  • Target version deleted (4.6.2)
Actions #9

Updated by Riccardo De Contardi about 10 years ago

As far as I can see the problem is fixed in TYPO3 6.2.5:

Test done:

1. create a page
2. in TS Config field added all the code provided (I added the "media" type as forbidden)
3. create a new content
3.1 the wizard show only "image" in the tab "typical page content" (btw it is the only tab)
4. the element ctype dropdown shows only standard(optgroup)> image

Actions #10

Updated by Riccardo De Contardi over 9 years ago

  • Status changed from Accepted to Closed
  • Is Regression set to No

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF