Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

figcaption-Felder haben unterschiedliche Feldlängen #8277

Closed
Anke opened this issue Mar 16, 2016 · 4 comments
Closed

figcaption-Felder haben unterschiedliche Feldlängen #8277

Anke opened this issue Mar 16, 2016 · 4 comments
Assignees
Labels
Milestone

Comments

@Anke
Copy link

Anke commented Mar 16, 2016

In der Dateiverwaltung (Meta-Infos) werden für Bildunterschriften mehr als 255 Zeichen akzeptiert.

Beim Inhaltselement Bild wird die Bildunterschrift nach 255 Zeichen abgeschnitten bzw. es gibt eine Fehlermeldung, egal ob die Bildunterschrift aus den Metadaten übernommen oder direkt im ce_image eingegeben wird.

Figcaption-Felder sollten m.E. gar nicht begrenzt werden. (Ich muss gerade Bilder einer Großveranstaltung mit sehr langen Beschreibungen versehen. Dafür kann ich das ce_image mit dieser Einschränkung nicht verwenden, sondern muss die Bilder im Content-Slider via Tiny oder HTML-Element einbinden - mit den damit verbundenen Nachteilen.)

@fritzmg
Copy link
Contributor

fritzmg commented Mar 16, 2016

Reproduction

  1. go into the File manager
  2. edit a picture and insert a caption longer than 255 characters, e.g. [1], then save
  3. go into the Articles section, edit an article and create a new content element
  4. choose the content element Image for example, select the picture you edited before
  5. save - there will be an error saying 'Field "Image caption" must not be longer than 255 characters!'

Maybe the caption field in tl_content should be changed from

varchar(255) NOT NULL default ''

to

text NULL

or

mediumtext NULL

and 'maxlength'=>255 be removed from eval.

[1]
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec.

@leofeyer leofeyer added this to the 3.5.9 milestone Mar 17, 2016
@leofeyer leofeyer self-assigned this Mar 18, 2016
@leofeyer
Copy link
Member

Fixed in 22efee7.

jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Mar 26, 2016
### 4.1.2 (2016-03-22)

 * Handle derived classes in the exception converter (see #462).
 * Prevent the autofocus attribute from being added multiple times (see contao/core#8281).
 * Respect the SSL settings of the root page when generating sitemaps (see contao/core#8270).
 * Read from the temporary file if it has not been closed yet (see contao/core#8269).
 * Always use HTTPS if the target server supports SSL connections (see contao/core#8183).
 * Adjust the meta wizard field length to the column length (see contao/core#8277).
 * Correctly handle custom mime icon paths (see contao/core#8275).
 * Show the 404 error page if an unpublished article is requested (see contao/core#8264).
 * Correctly count the URLs when rebuilding the search index (see contao/core#8262).
 * Ensure that every image has a width and height attribute (see contao/core#8162).
 * Set the correct mime type when embedding SVG images (see contao/core#8245).
 * Handle the "float_left" and "float_right" classes in the back end (see contao/core#8239).
 * Consider the fallback language if a page alias is ambiguous (see contao/core#8142).
 * Fix the error 403/404 redirect (see contao/website#74).
@fritzmg
Copy link
Contributor

fritzmg commented Apr 18, 2016

Doesn't this change constitute a BC break? Before Contao 3.5.8 people used e.g.

$GLOBALS['TL_DCA']['tl_files']['fields']['meta']['eval']['metaFields'][] = 'copyright';

in their extension or dcaconfig.php to extend the meta fields. With Contao 3.5.9 this will not work anymore. An additional input field will still get rendered, but without a label and without the existing data.

Now they need to use

$GLOBALS['TL_DCA']['tl_files']['fields']['meta']['eval']['metaFields']['copyright'] = '';

@leofeyer
Copy link
Member

No, the data will be converted automatically here:

https://github.com/contao/core/blob/master/system/modules/core/widgets/MetaWizard.php#L50

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants