Closed (duplicate)
Project:
MERCI (Manage Equipment Reservations, Checkout and Inventory)
Version:
6.x-2.0-beta11
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 Jul 2011 at 00:27 UTC
Updated:
22 Jul 2011 at 18:33 UTC
Comments
Comment #1
darrick commentedWhen this happens for a bucket how many items do you have for the bucket. What hours of operation do you have? There is this bug: http://drupal.org/node/1199048 which I haven't had a chance to look at. Usually whenever I have memory exhaustion it's due to an infinite loop.
Comment #2
richbcph commentedI'll check out the patch.
Site hours:
M,T,W,T,F,Sa,Su 01:00-24:00 w/ No close dates. All items available weekend and over night.
As for the buckets I have 2 buckets setup one with 4 and one with 2. Also happens with resources.
Comment #3
richbcph commentedThat patch was it. Initially I just set the hours to 23 instead of 24 and it worked. I applied the patch (simply copying and editng the code from the patch) into the theme.inc file and it worked!
Note to anyone else running windows. I read many a tutorial on how I had to run patch.exe and unix2dos.exe and patch.bat and had nothing but issues. If you read your error code there is a good chance you can just copy the new patched code into the offending file and save it diretcly using notepad.
example:
Patch update code:
diff --git a/theme/theme.inc b/theme/theme.inc
index dda4c94..add6f25 100644
--- a/theme/theme.inc
+++ b/theme/theme.inc
@@ -121,6 +121,10 @@ function template_preprocess_merci_conflict_grid(&$variables) {
while ($time < $hours[$day]['close']) {
$pretty_hours[$date][] = date('ga', strtotime($time));
$time = date('H:i', strtotime($time . ' +1 hour'));
+ //avoids overflow to next day
+ if($time < '01:00') {
+ break;
+ }
}
}
All I needed from that patch was (without the + signs):
while ($time < $hours[$day]['close']) {
$pretty_hours[$date][] = date('ga', strtotime($time));
$time = date('H:i', strtotime($time . ' +1 hour'));
+ //avoids overflow to next day
+ if($time < '01:00') {
+ break;
+ }
}
}
Hope this helps someone down the road.
Thanks again for your help :)
Comment #4
darrick commentedThanks for checking this out. I'm closing this issue but leaving http://drupal.org/node/1199048 open until I get a chance to commit the fix.