I get this PHP notice

Notice: Use of undefined constant LINK_URL_MAX_LENGTH - assumed 'LINK_URL_MAX_LENGTH' in link_field_schema() (line 16 of /srv/example.com/sites/all/modules/link/link.install).

This happens only on first pageload after I clear Drupal's cache. It seems the install function does not have access to the constant definition in the .module-file. On subsequent page loads, this warning goes away - presumably because the necessary constant is properly defined/cached by then.

This is on a clean D7 installation.

CommentFileSizeAuthor
#2 1125384.patch403 bytesrobloach

Comments

achton’s picture

Title: LINK_URL_MAX_LENGTH undefined during install » LINK_URL_MAX_LENGTH undefined when module is disabled

It turns out I had Link disabled. When uninstalled or installed, this error does not occur.

Issue title changed accordingly.

robloach’s picture

Status: Active » Needs review
StatusFileSize
new403 bytes

Yup... Doesn't know what LINK_URL_MAX_LENGTH is since it doesn't run through link.module.

jcfiala’s picture

Status: Needs review » Fixed

A simple enough fix - I've applied the patch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.