Hi,
I get various notices;
Notice: Use of undefined constant PRINT_TYPE_URLLIST_DEFAULT - assumed 'PRINT_TYPE_URLLIST_DEFAULT' in _print_url_list_enabled() (line 470 of /Users/itjh/workspace/zahak-dev-drupal/sites/all/modules/print/print.pages.inc
Notice: Uninitialized string offset: 0 in _print_rewrite_urls() (line 383 of /Users/itjh/workspace/zahak-dev-drupal/sites/all/modules/print/print.pages.inc).
Notice: Uninitialized string offset: 0 in _print_rewrite_urls() (line 401 of /Users/itjh/workspace/zahak-dev-drupal/sites/all/modules/print/print.pages.inc).
While performance loss i quite small, there is still a loss. Also, notices mix up coding of page, which is quite annoying when developing a new website. I'll fix a patch in a few minutes.
Comment | File | Size | Author |
---|---|---|---|
#2 | print-fix_notices-1579176-1.patch | 829 bytes | Zahak |
Comments
Comment #1
jcnventura CreditAttribution: jcnventura commentedWow, a bold tester... I'm glad you've taken the leap. However, there be sharks in these waters. The 7.x-2.x branch is in very uncharted territory nowadays (grep for @todo to see what I mean).
I'll wait for the patch, but I'd recommend the use of 7.x-1.x for any non-sandbox site. I'm not committing to any fixed date for the stable release of the 2.x branch.
Comment #2
Zahak CreditAttribution: Zahak commentedPatch killing killing notices on line 383 and 401.
Since I couldn't find any declaration of PRINT_TYPE_URLLIST_DEFAULT, and since it's new since 7.x-1.0 I assumed that it is a working progress and left it as it was.
Please notice that notices on line 383 and 401 was the main reason for me to create this issue, since they exist in 7.x-1.0 as well. However Drupal docs tells one to contrib to latest version (dev)?
My first contrib to Drupal world, so please let me know if I'm doing anything wrong. Starting small with a couple of notices ;)
Comment #3
jcnventura CreditAttribution: jcnventura commentedUnder absolutely no circumstance should the code ever find that $url[0] is not set. Since you obviously know how to code, can you find out the content of the $matches variable on entry to that function? This fixes the symptoms, not the problem, and I'd prefer to fix the problem.
Indeed, you should always patch against the latest dev, but not necessarily the latest branch. It's OK if you patch against 7.x-1.x-dev..
Finally, about PRINT_TYPE_URLLIST_DEFAULT, it's currently called PRINT_UI_TYPE_URLLIST_DEFAULT, but I think I may need to change it back..
Comment #4
jcnventura CreditAttribution: jcnventura commentedOh, and thanks for contributing back to Drupal. I (and everyone else) appreciates it a lot!
Comment #5
Zahak CreditAttribution: Zahak commentedAh, I see. Looked a bit further, and it appears when you have an empty href. Ehm... so well... don't really know if it should be announced as a bug in the module anymore ;)
Comment #6
jcnventura CreditAttribution: jcnventura commentedIt never occurred to me that someone with use an empty href.
I guess an extra check could be added in the 'do nothing' section for the case of empty($url).
Comment #7
Zahak CreditAttribution: Zahak commentedWell, empty href is highly unlikely. Blame my sandbox :)
Comment #8
jcnventura CreditAttribution: jcnventura commentedFixed the empty href case in dev.