Bug #24121
Link field for images is too short to provide links for every image
Status: | Closed | Start date: | 2010-11-18 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Steffen Kamper | % Done: | 0% |
|
Category: | - | Spent time: | - | |
Target version: | - | |||
TYPO3 Version: | 4.5 | Is Regression: | ||
PHP Version: | 5.3 | Sprint Focus: | ||
Complexity: |
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)
Related issues
History
#1 Updated by Kay Strobach over 4 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)
#2 Updated by Jo Hasenau over 4 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.
#3 Updated by Jo Hasenau over 4 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
#4 Updated by Kay Strobach over 4 years ago
please add relation "related" to #16031
#5 Updated by Henrik Ziegenhain over 4 years ago
Yeb, is Feature/Enhancement would be very cool.
I agree with Joey that we must stay compatible
#6 Updated by Kay Strobach over 4 years ago
@JoH, what about an update script?
convert comma link fields into \n link fields? The installtool could do that ;)
#7 Updated by Jo Hasenau over 4 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.
#8 Updated by Jo Hasenau over 4 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.
#9 Updated by Kay Strobach over 4 years ago
Jupp, i didn't had the rfc in my hand - but you're completly right!
Perhaps we can increase the priority ;)
#10 Updated by Kay Strobach over 4 years ago
please add relation "related" to #8184
#11 Updated by Steffen Gebert over 4 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.
#12 Updated by Kay Strobach over 4 years ago
duplicate is not fully correct.
This bug is about UI and we discussed problems and solutions.
#8184 is about a rendering problem in the fe!
OK, fe and be are related, but it's not really the same.
#13 Updated by Jo Hasenau over 4 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
#14 Updated by Jo Hasenau over 4 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
#15 Updated by Jo Hasenau over 4 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.
#16 Updated by Steffen Gebert over 4 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
#17 Updated by Jo Hasenau over 4 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.
#18 Updated by Steffen Gebert over 4 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.
#19 Updated by Jo Hasenau over 4 years ago
this is a bugfix and not a feature - so it should be no big deal
I will provide a patch anyway
#20 Updated by Steffen Gebert over 4 years ago
I mean in terms of workload (to code, review and test..)
Nevertheless, feel free - would be welcome, of course!
#21 Updated by Jo Hasenau over 4 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.
#22 Updated by Jo Hasenau over 4 years ago
Pending in the Core List
#23 Updated by Jo Hasenau over 4 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
#24 Updated by Kay Strobach over 4 years ago
thanks to everyone working on that issue ';)
#25 Updated by Jo Hasenau over 4 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.
#26 Updated by Jo Hasenau over 4 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.
#27 Updated by Christian Kuhn over 4 years ago
trunk rev. 10117.
#28 Updated by Kay Strobach over 4 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?
#29 Updated by Jo Hasenau over 4 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.
#30 Updated by Kay Strobach over 4 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?
#31 Updated by Christian Kuhn over 4 years ago
@Kay: This will change if translators update the labels.