Using profile2 7.x-1.0-beta2 I have trouble saving office hours field entries.

The weights changes or drag and drop changes are not saved.
I don't see the add more hours link (even though : Display the "Add more hours" link is selected)

Comments

Jerome F’s picture

The following Notice appears on top of the profile2 edit page where the Office hours field is used.
Notice: Undefined index: field_subscriber_office_hours in office_hours_field_process() (line 61 of (...)/sites/all/modules/office_hours/office_hours.elements.inc).
field_subscriber_office_hours is my field machine name

corresponding line is : $field = $form_state['field'][$element['#field_name']][$element['#language']]['field'];
according to http://drupal.org/node/728792 that's the Hook Widget
An other module which uses this is nodereference.

I tried all I know about isset but that's likely to be not enough.

This notice doesn't appear on the content edit page. That's why I group these issues, it's specific to the use with Profile2.

Jerome F’s picture

Title: Problems saving office hours field data in Profile2 - issues with new D7 field API? » Add more hours link not displayed in Profile2

Changing the title to better describe the most important problem here, as the weight problem is secondary.

Changed priority to major, that's not critical because the module can be used fine in a regular content type, but as a Profile2 field, it is not usable as is, unless you're open for lunch of course :-)

neoziox’s picture

Priority: Normal » Critical

Same bug:
Notice : Undefined index: field_horaires in office_hours_field_process() (line 61 of (...)/web/sites/all/modules/office_hours/office_hours.elements.inc).

johnv’s picture

There is another issue for the Notice : Undefined index: #1555574: Profile2 Notice: Undefined index: <field> in office_hours_field_process() (line 62 of office_hours.elements.inc) .
@Jerome F: IYO, is your original problem The weights changes ... are not saved; No add more hours link connected to the Notice, or ar they 2 different problems?

johnv’s picture

Status: Active » Fixed

This is committed in 050e980 .
Please test and report any problems. I have only tested it with 'main profile'.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

scotwith1t’s picture

Status: Closed (fixed) » Reviewed & tested by the community

The dev commits worked like a charm. We were working on 1.0 and getting exactly the same thing. Please commit the latest dev to a new release ASAP so we can abandon the dev version. Thanks for a great module, critical to our project!

johnv’s picture

Status: Reviewed & tested by the community » Closed (fixed)

thanks.

scotwith1t’s picture

Status: Closed (fixed) » Reviewed & tested by the community

What exactly is holding back from using this and other commits to put out a stable 1.1 or something like that? Just curious as I don't like to have dev releases on live sites when possible. What are the blockers?

WebmistressM’s picture

I also am having this issue. Subscribing

johnv’s picture

Category: bug » feature
Status: Reviewed & tested by the community » Fixed

@WebmistressM , have you tried the -dev version?

WebmistressM’s picture

@johnv

Figured I should only use a stable version for live sites or soon-to-be-live sites, correct? If so, I can probably try it on a staging copy and see if that error goes away.

johnv’s picture

@WebmistressM, ideally you would. But you'll find that a lot of modules have hidden bugs/missing features in the latest version. (Although currently 90% of the modules I use are stable versions) Plans are to to create a stable version the next week.

WebmistressM’s picture

thanks very much. I did try the dev version on my staging copy and that error goes away. Im no longer restricted from adding an Office Hours field to my profile types, and no errors come up. If you are as close to releasing the next stable version, than thi s will be good since I havent taken this site quite live yet.

Any chance you are taking feature requests?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

johnv’s picture

Issue summary: View changes