This is a great module already, thanks for this.

I was just wondering if you're planning to support entities in general instead of "just" nodes. In particular we would be very keen to get this working with users as well as we have added tons of fields to user profiles and it would be amazing if we could allow the users to edit those fields from their profile view easily.

CommentFileSizeAuthor
#1 jeditable.module.patch876 bytesjurgenhaas

Comments

jurgenhaas’s picture

Title: Supporting entities, not just nodes » Supporting user entities
Category: feature » bug
StatusFileSize
new876 bytes

Sorry, I should have checked the code first. I would have seen that you are supporting user entities already. However, there are some bugs and I created a patch to resolve them (see attached).

What's not sorted yet is that the languages are not really supported yet. I wonder if you wouldn't want to write the language code into the field id as well?

murz’s picture

Thanks for the patch, but I think that LANGUAGE_NONE is not so good, this is break translatable fields.
Maybe better to load field info and check translatable status? something like this:

         $field_info=field_info_field($field_name);
        $user->{$field_name}[$field_info['translatable']?$user->language:LANGUAGE_NONE][0]['value'] = $value;
        $edit = array($field_name => array($field_info['translatable']?$user->language:LANGUAGE_NONE => array($delta => array('value' => $value))));

P.S. I move my sandbox to official module page, so future updates will be in official git repository.

jurgenhaas’s picture

Looks like a good idea.

murz’s picture

Status: Active » Fixed

Ok, I committed this to 7.x-1.x branch in official page git, but without good testing. If you find some bugs, please open new bug in project.
P.S. If you want, I can add you as developer for this module, because I not often have time for work on this module. So you will can post patches directly to git.

jurgenhaas’s picture

That would be great. In fact I would like to add quite some more functionality to this module as I think it comes with a lot of potential.

Status: Fixed » Closed (fixed)

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