I have installed the latest D7 alpha, activated image, file, field ui modules etc. I have created an image node for upload of images and, for test reasons, also added images to a couple other content types. As D7 core offers no good way to display inline images in node body fields, I then installed the Insert module. (Under dependencies, btw, the readme still lists "FileField" and "ImageField" modules even though that functionality is now part of the core...)

Unfortunately, the module does not seem to do anything. No matter what type of field I configure, there is no "new section in the Field options for "Insert"" as outlined in the readme.txt. Am I missing something really obvious here or does it just not work with D7 alpha5?

Comments

quicksketch’s picture

It probably doesn't work (again). API changes keep breaking my Drupal 7 module ports. :P

dman’s picture

I see your pain. I thought I'd try it out and help testing, but gah.

First experience, Just enabled todays dev version of insert against a CVS HEAD of D7
drush dl insert-7.x-1.x-dev

Visited the edit page for the content (article) that had a multiple 'image' field available.
The fieldset where the images used to be was empty! Dang.

Notice: Undefined index: #file in theme_file_widget_multiple() (line 764 of /Library/WebServer/Documents/drupal7-dev/modules/file/file.field.inc).

Righty. look over at the settings, which are ... oh yeah, field settings for the content type admin/structure/types/manage/article/fields/field_images

Notice: Undefined index: object_type in insert_form_field_ui_field_edit_form_alter() (line 254 of /Library/WebServer/Documents/drupal7-dev/sites/all/modules/insert/insert.module).
Warning: Invalid argument supplied for foreach() in form_type_checkboxes_value() (line 1896 of /Library/WebServer/Documents/drupal7-dev/includes/form.inc).

... undefined indexes are pretty common for settings that have never been saved, so not too worried there.

But I DO see the insert widget settings there in a collapsed fieldset under 'Preview Image Style'. Good?
So tick "Enable an insert button", "Default" and save.

Notice: Undefined index: #file in theme_file_widget_multiple() (line 764 of /Library/WebServer/Documents/drupal7-dev/modules/file/file.field.inc).

Back to the content edit and...
:-(
Nope. An empty fieldset where the files used to be.

I know the API instability you are fighting with, so all I can offer is my unhappy test results for now. Not sure where to start debugging the new system, I guess there is a new way of doing form_alter, I can't see it in the code. Time to learn...

dman’s picture

Status: Active » Needs review
StatusFileSize
new1.4 KB

OMG, I did it!
Not as much agony as I expected.

dman’s picture

Version: 7.x-1.0-alpha1 » 7.x-1.x-dev

(The extra comment there was unintentional to this patch, but useful I guess)

quicksketch’s picture

Nice one! I'll take a look at this next time I'm working on Insert.

quicksketch’s picture

Status: Needs review » Fixed

Looks like this was the same bug as #792024: Form error after installing on drupal 7.0-alpha4. I've committed the patch from there, which fixed a few more places than those included here.

Status: Fixed » Closed (fixed)

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