Closed (fixed)
Project:
Ajax pages
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
11 Aug 2013 at 01:15 UTC
Updated:
16 Sep 2013 at 14:21 UTC
Jump to comment: Most recent file
Hello,
I'm testing your wonderful module. :)
The following error message appears after module installation:
Notice: Use of undefined constant LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX - assumed 'LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX' in ajax_pages_init() (on line 52 in all/modules/ajax_pages/ajax_pages.module).
It seems to collide with the "locale" core module. When I disable it, the error message disappears.
Best regards!
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | ajax_pages-locale-2062461-1.patch | 1.51 KB | jamix |
Comments
Comment #1
jamix commentedThank you for reporting this. The constant is declared in locale.inc, and that file is included in
locale_init(). The problem is thatajax_pages_init()is called beforelocale_init()and soLOCALE_LANGUAGE_NEGOTIATION_URL_PREFIXis not yet declared by then.We could adjust the module weight for Ajax pages so that its
hook_init()implementation would run after that of the Locale module but that breaks a few other things, notably thehook_page_delivery_callback_alter()implementation when the Boost module is enabled. So I decided to force-include locale.inc inajax_pages_init()instead.Please try the attached patch.
Comment #2
design.er commentedSorry for the delayed reply - I've been completely snowed under with work for the last weeks.
Your patch works like a charm. I tested it with and without "Locale" module -> no errors and everything works fine! Thank you very much for the quick fix. I'm looking forward to use it for my next project.
Sorry for the off-topic: do you plan to upgrade your module to Drupal 8 or are there any core solutions for ajax-driven navigation that would make an upgrade unnecessary?
Comment #4
jamix commentedCommitted and pushed to 7.x-1.x. Thank you!
As far as the Drupal 8 version goes, I haven't explored porting the module to Drupal 8 yet so I'm afraid I don't have anything to say at this point.