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.
Hi I'm wondering if it's possible to increase the length of the base URL field for the layer settings. I often run into trouble because of truncated URLs.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1512486-01.openlayers.wmsurllength.patch | 1.53 KB | ekes |
Comments
Comment #1
ekes CreditAttribution: ekes commentedThe field is stored serialized in the data text field of the {openlayers_layers} table, so there is plenty of space, and no constraint other than the form field and validation. 2083 characters seems a common maximum for URLs, although though they could be longer. So suggest patch attached (or even larger?).
Comment #2
ekes CreditAttribution: ekes commentedComment #3
ekes CreditAttribution: ekes commentedComment #4
PolThanks @ekes ! Patch committed ;-)
I had to do it manually because your patch was containing stuff from #1491314: Redundant indexes on Styles and Layers tables.
Comment #5
PolComment #6
de_chris CreditAttribution: de_chris commentedHi, thanks. Can I update to the latest dev or do I have to patch?
Comment #7
de_chris CreditAttribution: de_chris commentedHi, I tried the latest dev (2012-Aug-28) but there is a new problem. The WMS Base URL field remains empty now. I've created a new issue for that (http://drupal.org/node/1761768) since it might be an other problem.
Comment #8
PolHello,
Can you check again with the dev version ?
Thanks.
Comment #9
de_chris CreditAttribution: de_chris commentedHi, thanks for the fast reply. In the latest dev version the WMS Base URL field contains now the URL. So the issue with the empty field is solved. But the problem of this thread remains since I still can't insert URLs with more than 128 characters.
Comment #10
PolHello @de_chris,
I just tested and it works pretty good, the base layer is not trimmed or altered.
Steps I did:
Comment #11
de_chris CreditAttribution: de_chris commentedHello @Pol,
I also tested it with a new layer and it works. The restrictions only remain when editing or cloning existing layers. Thanks a lot.
Comment #12
PolWeird, I'll fix that tonight. Thanks for the report.
Comment #13
PolHello @de_chris,
I wasn't able to reproduce the problem even by editing the layer.
Comment #14
de_chris CreditAttribution: de_chris commentedHi my steps to reproduce:
edited an existing layer created with an older OL-Version; replace existing url by:tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt; copied the sting in the field and got:tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
but thats not a great problem since I can now create new layers with more than 128 long urls.
Comment #16
japo32 CreditAttribution: japo32 commentedThanks. I used the same fix for a new XYZ Layer. :)
in
openlayers_layer_type_xyz.inc
Comment #17
PolThanks, I did it on 7.x-2.x too.