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.
It's about #1149910: drupal7 insert relative paths
Wold you add same behavior for colorbox enabled images for insert?
Comment | File | Size | Author |
---|---|---|---|
#3 | insert-relative-urls-D6-1207372-3.patch | 1.74 KB | soulfroys |
#1 | insert relative URLs | 1.47 KB | fasdalf@fasdalf.ru |
Comments
Comment #1
fasdalf@fasdalf.ru CreditAttribution: fasdalf@fasdalf.ru commentedIt was easy. In the end of colorbox.theme.inc add colorbox_relative_url()
and change template_preprocess_colorbox_insert_image()
Comment #2
frjo CreditAttribution: frjo commentedI will follow the changes in the Insert module.
Comment #3
soulfroysThis is my "backport" (attached) based on comment #1 for the last 6.x-1.x-dev. Needs lots of love (Drupal/PHP newbie) but solves my problem. My scenario: my site was installed in a subdirectory and I need the url relative to the root.
Thanks @fasdalf@fasdalf.ru!
Comment #4
tahiticlic CreditAttribution: tahiticlic commentedAny chance that this fix will be commited ?
BTW, you need to add base_path() to the trimmed URL in order this to work in all cases.