When entering an internal URL alias into field URL Address, the URL is not resolved; it redirects to the absolute URL.
For instance I enter topics/test (URL alias pointing to internal path taxonomy/term/1) into the URL Address field. Redirects to http://topics/test; I except though that it recognizes the alias as internal path and handles the redirection appropriately.
I tracked it down to the line of code when validating the Drupal path in function _simpleads_validate_url(); drupal_valid_path() handles only internal paths. So the correct code is:
if (drupal_valid_path(drupal_get_normal_path($url))) { ... }
Instead of:
if (drupal_valid_path($url)) { ... }
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | simpleads-redirect-to-alias-1797230-1.patch | 681 bytes | sitiveni |
Comments
Comment #1
sitiveni commentedAnd here's the patch.
Comment #2
minnur commentedThanks, I added this to deve version.
Comment #3
minnur commented