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.
When running drupal in PHP 5.3, purl is throwing undefined index notices when doing purl_domain rewrites:
Notice: Undefined index: path in purl_domain->rewrite() (line 55 of /drupal/sites/all/modules/contrib/purl/includes/purl_domain.inc).
The php parse_url function does not set keys for url elements that are not present, and in this case if you are viewing the site root, there is not path element present.
Comment | File | Size | Author |
---|---|---|---|
#2 | undefined_index-1683876-2.patch | 655 bytes | bblake |
#1 | purl-1683876-1-undefined-index-purl_domain.patch | 648 bytes | mikemccaffrey |
Comments
Comment #1
mikemccaffreyPatch attached.
Comment #2
bblake CreditAttribution: bblake commentedThanks for the patch. There wasn't anything wrong with it, but I re-rolled one to match the syntax of how that path checking happens in the subdomain include. Can you take a look and verify that this still fixes the issue and works correctly for you?
Comment #3
arosboro CreditAttribution: arosboro commentedI had this issue and came to the same solution. This patch works for my use case.
Comment #4
bblake CreditAttribution: bblake commentedThanks for the help. I've committed the patch in #2.
Comment #6
joelwallis CreditAttribution: joelwallis commentedI just stumpled upon this issue and I can see that you guys already solved this, and commited to the branch 7.x-1.x (see the commit a9ef21c). But you haven't released this on a new PURL version.
Also, the 7.x-1.0-beta1 is there for almost three years, and there are seven paths commited after this version. Why there's no -beta2 release yet? The latest commit was made 2 years ago. Is this module abandoned?
Comment #7
brunorios1 CreditAttribution: brunorios1 commented+1