Welcome!

I've found a notifications_tags.module error. If module enabled and we are creating a new node with new taxonomy* term(s) and than push "Preview" button it causes error messages like this:

Notice: Trying to get property of non-object notifications_tags_notifications_object_node() function (notifications/notifications_tags/notifications_tags.module 185 row).

Problem is that this particular moment the new taxonomy term hasn't got taxonomy id (tid) yet, but notification try to use it to load taxonomy term if term object doesn't exists.

Here is my fix for this issue. Please review this.

* Notification tags subscription should be enabled on this taxonomy.

(If $item['tid'] isn't integer, in that case $item['taxonomy_term'] won't be exist too.)

Greetings, mxr576.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mxr576’s picture

However I'm also not sure, is notifications_tags_node_terms() should called, when only just preview the node?

DamienMcKenna’s picture

Issue summary: View changes
Parent issue: » #2507375: Plan for Notifications v7.x-1.0 release
FileSize
1.06 KB

Fixed a typo in the patch, and added a check that $item['tid'] exists before testing it.

jacob.embree’s picture

Status: Needs review » Reviewed & tested by the community