image_attach images not displayed in 3.3 while they were in 3.1

doc2@drupalfr.org - September 2, 2008 - 13:54
Project:editablefields
Version:5.x-3.3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

On editablefields table and list no form forms, version 3.3, attached images aren't displayed anymore, while they were in 3.1.

#1

markfoodyburton - September 2, 2008 - 13:57

Very odd....
Can you investigate a bit - there shouldn't be anything that makes less things work!

Cheers

Mark.

#2

doc2@drupalfr.org - September 3, 2008 - 10:50

Edit:

Excuse me, I forgot to say that I was using a modified version of EF 3.1. But I don't think this is the problem (skip to just after the latest code area)

Ali27 made it so that we can use javascript to fill all the fields at once. But he's not with us anymore. He added, on line 579 :

<?php
function editablefields_form_alter($form_id, &$form) {
// dev-value-080520 : add a link script jquery to editablefiels.js
drupal_add_js(drupal_get_path('module', 'editablefields') . '/editablefields.js');
// dev-value-080520 : add a link script jquery editablefiels.js
 
foreach ($form as $key=>$f) {
?>

and in the (brand_new) editablefields.js file:

// $Id $

//@file
//Code that operates auto value to copy right field , title field, day select, month select, year select
//@author ali

$(document).ready(function()
{
   //moves selection if add is clicked to selected box
  $('span.add_copy').click(function() {
  $('textarea.copright').val(prompt("Copyright et droits d\'exploitation :",""));
   });
  
    $('span.add_titre').click(function() {
    $('input.stitles').val(prompt("titre :",""));
   });
  
$('select.oday').change(function(){
$('select.day').val($('select.oday').val());
});

$('select.omonth').change(function(){
$('select.month').val($('select.omonth').val());
});

$('select.oyear').change(function(){
$('select.year').val($('select.oyear').val());
});
});

I don't think these snippets break the code because I've just tested with clean 3.1 and 3.3 versions, and after I:
ran update.php, cleared my server and browser's cache, cleared views' cache, relogged
for both of them, the first worked and the second didn't.

    Here are some screenshots:

Would you have any hint of things I should tell you in order to help? Should I use devel? Should I attach the exported view?

Best Regards,
Arsène

AttachmentSize
views-table_view.png 55.17 KB
ef31-table_views.png 64.28 KB
ef33-table_views.png 20.36 KB
views-list_view.png 55.59 KB
ef31-list_views.png 64.14 KB
ef33-list_views.png 22.29 KB

#3

premanup - October 28, 2008 - 11:02

CCK image field also does NOT displayed in EF3.3 in my Drupal 5.10.
I've discovered It depends on line 300 in the file "editablefields.module".
That line looks like:

$field['options']='default';

So I just comment this line:

// $field['options']='default';

And now cck image field is displayed as usualy.
It seems like this modification doesn't destroy any functionality of EF and as far as I know affects only uneditable fields.
So all editable fields are working.

#4

doc2@drupalfr.org - October 28, 2008 - 14:51
Status:active» postponed (maintainer needs more info)

Thanks for sharing!

I won't hack since I prefer to use stable release version and being able to follow upgrades easily (v.1.1 is stable for me). What's more, it *seems* to be an easy fix to commit.

Changing to "need more info" cause one source of problem is identified and to press to know whether dropping this line can be safe or if something else is needed.

 
 

Drupal is a registered trademark of Dries Buytaert.