Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
At now 'source' field of Feed entity is limited to 255 symbols, that is too short for different URL's with many GET arguments.
Will be good to extend max ength of feed source url field at least to 2048 symbols: https://www.boutell.com/newfaq/misc/urllength.html
Comment | File | Size | Author |
---|---|---|---|
#4 | feeds_url_length_2979659_4.patch | 526 bytes | Murz |
|
Comments
Comment #2
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedThat sounds like a good idea. Do you want to create a patch for this? It could be that a database update is also needed, but I'm not sure about that. For some changes in database schema, Drupal automatically generates database updates.
Comment #3
MurzI try to create the patch, seems the right place for extend field size is in file
src/Entity/Feed.php
at:but when I try to modify length via
- nothing changes, even after clearing all caches.
Comment #4
MurzI found the right place, simply adding
#maxlength
parameter to form item insrc/Feeds/Fetcher/Form/HttpFetcherFeedForm.php
solves the problem, without any database changes. Patch is attached.But seems that we can extend URL length to larger values, because as described in https://www.boutell.com/newfaq/misc/urllength.html - 2048 is only Internet Explorer limit, other browsers support length up to 65,536 (Firefox) - 190,000 (Opera).
Comment #5
MurzComment #7
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedI checked the feeds_feed table and I see that the source column (where the URL is saved) already accepts 2048 characters. I saw in \Drupal\Core\Render\Element\Url that Drupal core sets an URL element by default to a max length of 255, so that's why there was that limit.
Thanks for the patch. Committed #4.