Closed (fixed)
Project:
Resource Conflict
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
7 Mar 2008 at 13:09 UTC
Updated:
12 Jul 2008 at 17:44 UTC
there is empty variable $conflict->{$field} when you use more then one resource conflict contents, or maybe it depends on my module configuration
patch:
foreach($fields as $field) {
foreach($node->{$field} as $instance) {
foreach ($overlap_nodes as $conflict) {
// my code :) don't ask me why ;))
if (empty($conflict->{$field})) { continue; }
foreach($conflict->{$field} as $conflict_instance) {
if ($instance['nid'] == $conflict_instance['nid']) {
$booked_resource = node_load($instance['nid']);
form_set_error('Resource Conflict',
t('There is a resource conflict. "%resource" is currently booked. Please choose a different time or a different resource.',
array('%resource' => $booked_resource->title)));
}
}
}
}
}
Comments
Comment #1
deviantintegral commentedDid you have this problem on your testing site as well? Anyone else having this issue?
Thanks,
--Andrew
Comment #2
gnucifer commentedI have this problem aswell, as you say the problem should arise when other event-enabled contenttypes are missing the same node reference field as in the current node. Thanks for the patch by the way!
Comment #3
deviantintegral commentedI've committed this in CVS 124098 to the -dev version. In the future, be sure to follow the patching guidelines for drupal.
Thanks!
--Andrew
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.