Project

General

Profile

Actions

Bug #24121

closed

Link field for images is too short to provide links for every image

Added by Kay Strobach over 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-11-18
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The field should be an textarea like it is for "alt" and "title" text.

Long and anoying discussion on the german newsgroup

http://lists.typo3.org/pipermail/typo3-german/2010-November/073503.html

The problem is very old and Gerhard Obermayr told about that about 2 years ago.
(issue imported from #M16462)


Files

16426.diff (3.41 KB) 16426.diff Administrator Admin, 2011-01-06 15:57
16426_alternative.diff (4.09 KB) 16426_alternative.diff Administrator Admin, 2011-01-06 18:29
16426_alternative_v2.diff (4.71 KB) 16426_alternative_v2.diff Administrator Admin, 2011-01-06 22:14
16426_v2.diff (4.27 KB) 16426_v2.diff Administrator Admin, 2011-01-07 12:22
16426_v3.diff (8.96 KB) 16426_v3.diff Administrator Admin, 2011-01-18 20:09

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Feature #23766: Implement new layout and labels for tt_content as result of T3UXW09ClosedSteffen Kamper2010-10-17

Actions
Related to TYPO3 Core - Task #57006: SoftReferenceIndex typolink[linkList] missing support separation by line feedClosedMarc Bastian Heinrichs2014-03-17

Actions
Has duplicate TYPO3 Core - Bug #18656: image_link: commas in URLs will be truncatedClosedChristian Kuhn2008-04-21

Actions
Actions #1

Updated by Kay Strobach over 13 years ago

change typo3/sysext/cms/ext_tables.sql:396

image_link varchar(255) DEFAULT '' NOT NULL,

to:

image_link text DEFAULT '' NOT NULL,

change typo3/sysext/cms/tbl_tt_content.php: around 822

'type' => 'input',
'size' => '50',

to

'type' => 'text',
'cols' => '30',
'rows' => '3',

additionally we need to change the seperation to breaks instead of comma (or both?) in the template (css_styled_content i assume)

Actions #2

Updated by Jo Hasenau over 13 years ago

Actually a first step has been made already, since the current TCA says:

'max' => '51200'

which is the maximum number of images (200) multiplied by a maximum value of 256 per URL

Original DIFF can be found here: #23766

Since this was my patch, I just implemented a resized DB field as well, but: The patch was just about the TCA, so the DB field size had to be removed before committing it.

IMHO we could do a follow up to this patch during the beta phase, since the current size of the DB field doesn't match the TCA.

Actions #3

Updated by Jo Hasenau over 13 years ago

BTW: If there will be a change in the TypoScript, it surely has to be backwards compatible, since the existing CSV lists MUST still work with 4.5

Actions #4

Updated by Kay Strobach over 13 years ago

please add relation "related" to #0016031

Actions #5

Updated by Henrik Ziegenhain over 13 years ago

Yeb, is Feature/Enhancement would be very cool.
I agree with Joey that we must stay compatible

Actions #6

Updated by Kay Strobach over 13 years ago

@JoH, what about an update script?

convert comma link fields into \n link fields? The installtool could do that ;)

Actions #7

Updated by Jo Hasenau over 13 years ago

I don't think this will still be considered a "bugfix" then.

IMHO it should be possible to implement a check for both, linebreak and comma, in that order, since the current CSV version based on an "input" field will never contain a linebreak.

Actions #8

Updated by Jo Hasenau over 13 years ago

On the other hand, the URL definition http://www.ietf.org/rfc/rfc1738.txt says:

Thus, only alphanumerics, the special characters "$-_.+!*'(),", and reserved characters used for their reserved purposes may be used unencoded within a URL.

Which means: A comma is a legal part of a URL thus it must NOT be used as a separator.

This is what #18656 is about, so this one is related as well.

So after all it seems we do need a conversion script to fix all these bugs in one go.

Actions #9

Updated by Kay Strobach over 13 years ago

Jupp, i didn't had the rfc in my hand - but you're completly right!

Perhaps we can increase the priority ;)

Actions #10

Updated by Kay Strobach over 13 years ago

please add relation "related" to #0008184

Actions #11

Updated by Steffen Gebert over 13 years ago

I think with a working upgrade wizard, this still has a good chance to go into 4.5 with RM approval.
I see no problem in just changing the comma to \n, as comma-urls never should have worked.

Actions #12

Updated by Kay Strobach over 13 years ago

duplicate is not fully correct.

This bug is about UI and we discussed problems and solutions.

#0008184 is about a rendering problem in the fe!

OK, fe and be are related, but it's not really the same.

Actions #13

Updated by Jo Hasenau over 13 years ago

Actually both are about the same issue:
URLs can't be used according to http://www.ietf.org/rfc/rfc1738.txt
because
a) the field size is much too small
b) the separation is done by a character that can be a legal part of a URL

Actions #14

Updated by Jo Hasenau over 13 years ago

So do we agree on the following fixes to be necessary:

Change the DB field type to "text", because anything else won't fit 200 times the maximum size of a legal URL

Change the separation of links from CSV to linebreaks, because a comma can be a legal character used in a non encoded URL

Change the TCE form element to textarea, because this allows the necessary line breaks

Actions #15

Updated by Jo Hasenau over 13 years ago

If this is considered to be a bug, we should provide patches and update scripts for currently supported versions as well.

But this should be discussed with the release managers of these versions first.

Actions #16

Updated by Steffen Gebert over 13 years ago

Steffen, you assigned this entry to yourself. Are you working on this? I think this signals your approval with this change.

Besides the changes mentioned by Jo:
(4) upgrade wizard to change all , to \n

Actions #17

Updated by Jo Hasenau over 13 years ago

any news on this one?

I could provide a patch for (1), (2) and (3) but not (4) - so if there's nobody else currently working on that issue, I will do the RFC.

Actions #18

Updated by Steffen Gebert over 13 years ago

I dislike assigning bugs, when nobody is working on them. Steffen, could you please try to avoid this?

IMHO it's too late for 4.5, we still have too many open issues to solve.

Actions #19

Updated by Jo Hasenau over 13 years ago

this is a bugfix and not a feature - so it should be no big deal

I will provide a patch anyway

Actions #20

Updated by Steffen Gebert over 13 years ago

I mean in terms of workload (to code, review and test..)

Nevertheless, feel free - would be welcome, of course!

Actions #21

Updated by Jo Hasenau over 13 years ago

Working patch for 4.5 is attached

I will inform Benni so that he can check if this can be fixed in 4.4 as well.

Actions #22

Updated by Jo Hasenau over 13 years ago

Pending in the Core List

Actions #23

Updated by Jo Hasenau over 13 years ago

Attached another variant of the patch that will separate "old" field values by comma and new ones by line break

As soon as there is at least one linebreak available in the value, it must be a "new" one - therefor I changed the JS function to always include a linebreak at the end of the value

Actions #24

Updated by Kay Strobach over 13 years ago

thanks to everyone working on that issue ';)

Actions #25

Updated by Jo Hasenau over 13 years ago

Attached v2 of the alternative version that fixes an issue with the tabs in the link browser wizard not working when there are already 2 or more links in the textarea.

This will apply to the other version as well, so I will provide a v2 for that as well as soon as we got a decision which way to go.

Actions #26

Updated by Jo Hasenau over 13 years ago

Attached v2 of the original version that fixes an issue with the tabs in the link browser wizard not working when there are already 2 or more links in the textarea.

Actions #27

Updated by Christian Kuhn about 13 years ago

trunk rev. 10117.

Actions #28

Updated by Kay Strobach about 13 years ago

mhmm, field is very good,

but there is a little BUT:

All other fields are devided by CRLF,
Links are divided by COMMA (,)

That's inconsistent :( perhaps it's also possible to accept CRLF or convert COMMA to CRLF in installtool?

Actions #29

Updated by Jo Hasenau about 13 years ago

There is no BUT, since this behaviour has been kicked with this patch as well.

The patch adds the necessary changes to CSS styled content AND provides an update wizard to modify existing link fields from comma to line feed.

Actions #30

Updated by Kay Strobach about 13 years ago

ok, you're right.
I had the wrong css_styled_content included.

Last thing
The german field label translation still requests for a comma.

Don't know how to fix this, as it depends on css_styled_content and it's version - right?

Actions #31

Updated by Christian Kuhn about 13 years ago

@Kay Wienöbst: This will change if translators update the labels.

Actions

Also available in: Atom PDF