Steps to reproduce:
Set up time field on user entity with default settings apart from unlimited number of values.
Set up view of users, set the Format to Timefield MiniCal. Add field from above with default settings and set formatter to Mini Calendar.
Click Save - get a white screen with URL of "admin/structure/views/ajax/config-item/working_hours/page/field/field_working_hours" and a chunk of code on one line. The code is very long but starts with "[{"command":"settings","settings":{"basePath":"\/","pathPrefix":"","ajaxPageState":{"theme":"bartik","theme_token":". Full output in output.txt atached.

Kind Regards (and cheers for the perfect module for my staff rota needs)
Mark

CommentFileSizeAuthor
#5 my_timefield_in_view_output.txt53.91 KBalesr
output.txt29.56 KBMark F

Comments

Mark F’s picture

As I went back to the views field formatter options to set it back to "Duration", there was an error which was not there before:
Notice: Undefined index: adjust_time in timefield_field_formatter_settings_form() (line 436 of /var/aegir/platforms/drupal-7.12/sites/sandbox.dev-env/modules/timefield/timefield.module).

The chunk of code containing line 436 is:

    $element['adjust_range'] = array(
      '#type' => 'checkbox',
      '#title' => t('Adjust Range to fit Items'),
      '#default_value' => $settings['adjust_time'],
    );

Apologies but I'm in the VERY early stages of learning PHP. adjust_time is not mentioned anywhere else in the file - does it need to be defined earlier? If so, how? Give me a pointer and I'll make a patch - it'll be a good learning experience for me.

Kind Regards
Mark

wesnick’s picture

Status: Active » Closed (cannot reproduce)

Hi @Mark F,

Thanks for the bug report. It seems there are several issues you are reporting. In general, I like to have one item per bug report, so that I can close it when I have fixed it. It is hard to keep track of the progress on an issue if there are several different issues reported in the issue. Let me address these issues 1 by 1:

1. This seems like a views ajax failure, which could be caused by any number of things. I have tried to follow your steps to reproduce and I can't seem to be able to reproduce this bug. I did find several other minor mistakes in code that are just annoyances, but did not cause a WSOD. I have fixed these other things and pushed these changes to dev. I will fix anything that I can reproduce, so if this is still affecting you, by all means, reopen this issue.

2. Yes, adjust_time is a bug. This is a feature I planned to implement, then decided not to, and did not remove the code. I have removed it. The idea of this feature was to adjust the calendar to the range of values in it, so if you only had times between 10AM and 11 AM, then it would adjust to only show this range as upper and lower bound of the calendar. I don't see anyone clamoring for this, so I have removed it. If you think this might be useful, open another issue as a "feature request".

If you are still having trouble with the views part, perhaps the best way to help me troubleshoot it is to export the field configuration and view as a feature and post it here. That way I can try it out with your exact configuration.

alesr’s picture

I have the same issue as Mark.
I can't set Mini Calendar as formatter, because I get this WSOD. I just need to set up 1hour blocks for display format.

wesnick’s picture

Status: Closed (cannot reproduce) » Postponed (maintainer needs more info)

Hi, Thanks for the bug report. Please post a export of your view as an attachment, so I can debug this.

Thanks!

alesr’s picture

StatusFileSize
new53.91 KB

Here is my view export.

attisan’s picture

hi, same thing here.

If I try to change anything regarding the timefield field and click "apply" it returns the ajax instead.

greets