Closed (fixed)
Project:
Date
Version:
7.x-2.x-dev
Component:
User interface
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Sep 2011 at 15:39 UTC
Updated:
2 Dec 2011 at 21:00 UTC
I am trying to specify the input format for the date field in an event content type.
I am guessing that the option to do this is to be found under 'more settings and values', however when I select this, the fieldset does not expand.
Is there something wrong with the markup?
I am using bartik and usually such links are colored blue. As can be seen from my screenshot, the link appears not to be working.
| Comment | File | Size | Author |
|---|---|---|---|
| Date input format.jpg | 92.81 KB | mrpauldriver |
Comments
Comment #1
Olmo commentedI have a similar problem. I can not change the date range. And I believe in older versions, I have been able to do this by clicking the 'more settings and values'
Oder habe ich was übersehen?
Comment #2
dwkitchen commentedSame problem here as well looking at the HTML it is:
and should be
Comment #3
acbramley commentedGetting the same issue, I've tried changing admin themes (Rubik -> Seven) with no luck. Would appreciate some love on this issue.
Comment #4
acbramley commentedThis is a bug, bumping priority too as it's a pretty important part of the module.
Comment #5
gazwal commentedsubscribing
big bug cause the date have a "default value" (= current date) that can't be changed to "none"
Comment #6
acbramley commentedFor the time being I've been getting around this problem by editing line 488 from '#collapsed' => TRUE, to '#collapsed' => FALSE, this at least allows you to edit the default values and input format until this bug gets some traction.
Comment #7
mrpauldriver commentedRef #6
Zombienaute. Are you talking about line 488 in the date.module file?
If so, I am seeing something quite different to '#collapsed' => TRUE
Comment #8
acbramley commentedYes I am running the 7.x-2.x-dev from 2011-09-08. Just search the file for 'more settings and values' and changed the collapsed key to FALSE under there if it's different.
Comment #9
mrpauldriver commentedthank you
Comment #10
karens commentedThis is a part of the UI love that Acquia did. Maybe they can help figure it out.
Comment #11
jstollerI used the workaround in #6, but then had the same problem with the "Advanced settings" fieldset, within "More settings and values". That can be forced open by modifying line 331 of date_admin.inc in a similar mannor. It aint pretty, but it seems to work for now.
Comment #12
karens commentedI can't replicate the problem. It is likely to be either a browser issue or some other module that is interfering. Try creating a fresh install with only the date module and see if it a problem there. If not, you have some other module getting in the way. If it is still a problem there, it may be your browser and I need to know what that is.
Comment #13
karens commentedChanging title slightly. Other people are seeing it but I cannot reproduce it. It works fine on a clean install so it has to either be the theme or some other module creating problems.
Comment #14
Mark_L6n commentedThe problem appears to be with the value '+3'. Changing it to '3' corrects the problem for me.
Currently, Firefox gives me the error "uncaught exception: Syntax error, unrecognized expression: [value=+3]"
In file date_api/date_api_elements.inc, function date_year_range_element_process line 146, the value of
$element['#value']['years_forward']is '+3'. I added the line of code$element['#value']['years_forward'] = 3;and it started working fine.This obviously isn't the code to fix the module, but it shows where the problem is. At whatever point the value of
$element['#value']['years_forward']is used as an integer, the leading '+' needs to be stripped off.[edit] Using for now this line which strips the '+':
$element['#value']['years_forward'] = preg_replace( '/^\+(.+)/', '$1', $element['#value']['years_forward'] );Comment #15
clemens.tolboomI cannot reproduce #14 on Firefox.
Fieldset is collapsible on admin/structure/types/manage/my-content-type/fields/field_date_field
Theme: garland
Firefox: 8.0
Comment #16
karens commentedI am totally unable to reproduce this issue. It has to be either some other module or the browser or the theme.
For anyone having the issue, to test if it is a module issue, create a clean Drupal site with only Date module and set up one content type and a date field. You should see that it works fine. Then start adding other modules that you are using to try to see if one of them is causing a problem.
To test if it is a theme issue, switch to a core theme like Bartik and see what happens.
To test if it is a browser issue, try using a different browser.
Comment #17
acbramley commentedIt must be a module because I've tried both switching admin themes and browsers, non of which fixed the issue. It's not really feasible for me to create a fresh site and enable modules to test what breaks it as I've got so many modules in this site.
Comment #18
Mark_L6n commentedI created a new installation and added all the modules I used. The problem occurs with jQuery Update.
Comment #19
karens commented@Zombienaute, are you using jQuery Update too? If so, what version of jQuery and jQuery UI are both of you using? If we can nail that down maybe some jQuery guru can find a way to make it work across versions.
Comment #20
acbramley commentedIndeed I am using the jquery_update module. Version 7.x-2.2 which according to the info file makes jQuery version 1.5.2 and jQuery UI version 1.8.11
Comment #21
acbramley commentedConfirmed disabling the jquery_update module fixed both the more settings and values and advanced settings fieldsets.
Comment #22
acbramley commentedTested latest --dev version of jquery_update (which actually uses jquery 1.5.1 instead of 1.5.2) and same issue is happening.
Comment #23
Mark_L6n commentedUsing this code:
I am getting jQuery version 1.5.2, but the message 'jQuery.ui is undefined'.
Edit: Had code in wrong place. UI version is 1.8.11.
Comment #24
karens commentedRe-naming for clarity then. I can't fix jQuery issues. Hopefully someone who knows jQuery can do it.
Comment #25
karens commentedUnless the collapsed fieldsets are broken everywhere, this is still a Date issue, the jQuery code used in the fieldset must need to be adapted to work in a later version of jQuery.
Comment #26
Mark_L6n commentedYes, looking at #14, this might be a Date issue--the newer jQuery might just be rejecting a string when an integer is expected.
I tried following the code, but don't understand yet well enough how Drupal works to see what happens after date_api_elements.inc, function _date_api_element_info().
Comment #27
clemens.tolboomI know jquery but please update the issue summary with a 'steps to reproduce' :-)
I will follow-up on those steps then.
Comment #28
Mark_L6n commentedSteps to reproduce:
1) Enable jQuery update module.
2) Create a new content type, and add a Date field to it.
3) Edit the Date field. 'SHOW MORE SETTINGS AND VALUES' should function as a link to expand the fieldset. However, it just acts like plain text.
The line in the HTML causing the problem is:
<input class="select-list-with-custom-option forward form-text" type="text" id="edit-instance-widget-settings-year-range-years-forward" name="instance[widget][settings][year_range][years_forward]" value="+3" size="10" maxlength="128" />Changing '+3' to '3' allows it to function correctly.
Comment #29
clemens.tolboomError is cause by
Easy fix is adding double quotes
var possible = $dropdown.find('option[value="' + textfieldValue + '"]');Trying to diff against date.git file seemed this is fixed in #1239934: Reuse the "years back and forward" dropdown widget on the Views filter settings page 3 days ago. Yikes
Comment #30
clemens.tolboom@Mark123 thanks for the steps :)
We can consider this issue now fixed.