Closed (fixed)
Project:
Date
Version:
7.x-2.x-dev
Component:
Date Repeat API
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Jan 2012 at 00:52 UTC
Updated:
7 Apr 2012 at 19:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
hitfactory commentedComment #2
tim.plunkettThanks for the patch!
The above check will prevent it from showing the tab on nodes without repeating dates, but if a node has two date fields and only one of them is repeating, both still show.
This takes care of both parts.
Comment #3
karens commentedLooks good, committed. Thanks!
Comment #5
willvincent commentedIt looks like there have been additional changes since the patch(es) above got comit that have caused this issue to appear again.
Specifically, in the date_repeat_field_show() function, the fields that are being looped through are obtained with field_info_fields(), which gathers information about all fields on the site, rather than as was previously done with field_info_instances, to only get fields for the current entity and bundle.
The change requires another check in the if statement to ensure that the field being evaluated actually appears in the current entity/bundle.
I have attached a patch for this in both the older p0 format as well as the newer git patch format.
Comment #6
arlinsandbulte commentedCommitted #5:
http://drupalcode.org/project/date.git/commit/4ed5b3d
Comment #7
jlea9378 commentedI downloaded and installed the latest dev version today but am still experiencing this issue. When I attempt to browse to a Date page I see the Repeats tab even if it doesn't have repeating dates. If I click on the tab I get a fatal error:
"Fatal error: Cannot access empty property in /var/www/html/drupal_test/modules/field/field.attach.inc on line 325"
Using:
Calendar 7.x-3.0+5-dev (2012-Mar-13)
Content Construction Kit (CCK) 7.x-2.x-dev (2011-Aug-22)
Date 7.x-2.2+14-dev (2012-Mar-13)
Views 7.x-3.3+45-dev (2012-Mar-13)
Drupal 7.12
I tried to apply the patch in #5 but got an error saying it was already applied, so I aborted.
Comment #8
Gib... commentedI have the same problem in all content types of the site, even though they have no date field at all.
2 tabs show up : View and Repeats (in French)
I use date, calendar, views in block on the page but no date fields in the content nodes themselves.
Calendar 7.x-3.0
Date 7.x-2.2
Views 7.x-3.3
Content Construction Kit (CCK) 7.x-2.x-dev (2011-Aug-22)
Drupal 7.12
Comment #9
karens commented"7.x-2.2" is not the latest version. Bug fixes go into the dev version, where it has been fixed.
Comment #10
Gib... commentedThanks. The "bug" is gone with the dev version of Date.
For some time after upgrading to Drupal 7.x, it was writtent to use the dev versions of Date, Calendar, Views, etc. That info was removed and I thought it was better to switch to the recommended versions.
I've been using Drupal since about Drupal 6.4 and I'm still unsure what to do in these situations. It seems riskiy to use the dev versions when recommended ones are offered. It was necessary for some time since I have a multilingual site and only the dev versions worked. Then recommended ones were ok for a while... Now, there is a problem.... What should one do ? Try the recommeded and switch to dev if there is a problem ?
Thanks for the advice and your patience for newsbies.
Comment #11
karens commentedUse the recommended versions. But if you're seeing a bug and you want to get it fixed before a new release is issued you can move to the dev version. If it is fixed in dev it is 'fixed', so we mark this issue as done.