Michael Fürst
|
Wednesday 13 May 2009 2:45:01 pm
Hi Guys,
Yesterday I did the update from eZ 4.1.0 to 4.1.1. Before I did the update, i was able to add embedded images over the ezOE Editor. Now, if i try to select an image in from the media section, i only get a grey list with the image name and no option box. It looks like if you try to link an non-valid object. I've the following override settings in <b>/setting/override/content.ini.append.php</b>: [RelationGroupSettings]
Groups[]=images
DefaultGroup=objects
ImagesClassList[]=artikelfoto
ImagesClassList[]=image
Besides: "artikelfoto" is another image class in my system. To be sure that there are no overloading problems, I've added these lines directly in <b>/settings/content.ini</b> in the "[RelationGroupSettings]" section: ImagesClassList[]
ImagesClassList[]=artikelfoto
ImagesClassList[]=image
All caches are cleared, i've enough permissions in CMS (admin) but I'm not able to add the images - they are not shown as related objects. Does anyone know, if this is a bug in the new version? Or how I'm able to fix this problem?
Thanks in advance,
bye, Mike
|
André R.
|
Thursday 14 May 2009 8:48:26 am
it's not the response that is making the selections grayed out (firebug is THE tool for debugging ajax responses btw).
In the source of the upload image dialog its the 'classFilter' javascript parameter. It comes from $class_filter_array template variable set in ezoe/upload.php :
$contentTypeCase = ucfirst( $contentType );
if ( $contentIni->hasVariable( 'RelationGroupSettings', $contentTypeCase . 'ClassList' ) )
$tpl->setVariable( 'class_filter_array', $contentIni->variable( 'RelationGroupSettings', $contentTypeCase . 'ClassList' ) );
else
$tpl->setVariable( 'class_filter_array', array() );
$contentType is set by view parameter set from javascript:
$contentType = 'objects';
if ( isset( $Params['ContentType'] ) && $Params['ContentType'] !== '' )
{
$contentType = $Params['ContentType'];
}
So that parameter should be 'images', and it is set to that in design/standard/javascript/themes/ez/editor_template.js in:
_mceImage : function(ui, val)
{
var ed = this.editor, e = ed.selection.getNode(), eurl = 'images/', type = '/upload/', el;
if ( ui.nodeName === 'IMG' )
e = ui;
if (e !== null && e.nodeName === 'IMG')
{
type = '/relations/';
eurl = 'auto/'; // need to set to auto in case this is attachment icon
el = e;
eurl += e.getAttribute('id') + '/' + e.getAttribute('inline') + '/' + e.getAttribute('alt');
}
this._generalXmlTagPopup( type, eurl, 500, 480, el )
},
Start by checking source of image dialog to see what classFilter is set to (look for classFilter.push lines). If it is empty, then move on to check waht values you have in modules/ezoe/upload.php showed in the two first code blocks above. Hope that helps.
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom
|
Michael Fürst
|
Friday 15 May 2009 5:37:56 am
Hi Andre,
First: Thanks for you support :) Ok, I've checked the site.ini (override), and everything seems ok: [ImageDataTypeSettings]
AvailableImageDataTypes[]=ezimage
Then I've analysed the <b>json response</b> from the server during browsing the categories in the embedded window. If i click on a category I get the following Item-List. I copied three different object types, so maybe you'll see an error:
// FIRST LIST-ITEM OF CLASS "FOLDER"
-----------------------------------------------------------
{list:[
{
"name":"Files",
"id":50,
"contentobject_id":50,
"main_node_id":52,
"modified":"1080220220",
"published":"1080220220",
"section_id":3,
"current_language":"ger-DE",
"owner_id":14,
"class_id":1,
"class_name":"Folder",
"class_identifier":"folder",
"is_container":1,
"node_id":52,
"parent_node_id":43,
"url_alias":"Media\/Files",
"depth":2,
"path":false,
"children_count":1,
"image_attributes":[],
"data_map":[]
}
// SECOND LIST ITEM OF CLASS "IMAGE"
-----------------------------------------------------------
{
"name":"Ford Fiesta",
"id":693,
"contentobject_id":693,
"main_node_id":569,
"modified":"1242326049",
"published":"1242326049",
"section_id":3,
"current_language":"ger-DE",
"owner_id":14,
"class_id":33,"class_name":"Image",
"class_identifier":"image",
"is_container":0,
"node_id":569,
"parent_node_id":51,
"url_alias":"Media\/Fotos-Bilder\/Ford-Fiesta",
"depth":3,
"path":false,
"children_count":0,
"image_attributes":["image"],
"data_map":{"image":{"id":"5705","type":"ezimage","identifier":"image","content":{"articleimage468xX":false,"articleimage170xX"
:false,"original":{"url":"var\/storage\/images\/media\/fotos-bilder\/ford-fiesta\/5705-1-ger-DE
\/Ford-Fiesta.jpe"}}}}
}
// THIRD LIST ITEM OF CLASS "ARTIKELFOTO"
-----------------------------------------------------------
{
"name":"Novak Djokovic (SRB) Rom Finale ",
"id":611,"contentobject_id":611,
"main_node_id":501,
"modified":"1241447540",
"published":"1241447540",
"section_id":3,
"current_language":"ger-DE",
"owner_id":416,
"class_id":58,
"class_name":"Artikelfoto",
"class_identifier":"artikelfoto",
"is_container":0,
"node_id":501,
"parent_node_id":500,
"url_alias":"Media\/Fotos-Bilder\/Artikelfotos\/Contentfotos-Bilder-im-Artikel\/200905\/Novak-Djokovic-SRB-Rom-Finale",
"depth":6,
"path":false,
"children_count":0,
"image_attributes":["image"],
"data_map":{"image":{"id":"4935","type":"ezimage","identifier":"image","content":{"articleimage468xX"
:false,"articleimage170xX":false,"original":{"url":"var\/storage\/images\/media\/fotos-bilder
\/artikelfotos\/contentfotos-bilder-im-artikel\/200905\/novak-djokovic-srb-rom-finale\/4935-1-ger-DE
\/Novak-Djokovic-SRB-Rom-Finale.jpe"}}}}
}
As you can see, the image_attributes are set. Do you see any other strange thing in here? Beside: How do you debug the ajax response? Is there an option to enable a debug window (as in xajax for example)?
Ciao, Michael
|
Michael Fürst
|
Friday 15 May 2009 6:38:26 am
Hi,
Ok, after three days I've found the solution: In <b>/settings/siteaccess/site/image.ini.append.php</b> the AliasList is new declared, and thats the reason, why the alias "small" (wich is hardcoded in ezOE) cannot be found and the images are not listet. Here we go (image.ini.append.php):
[AliasSettings]
AliasList[] <------ RESET ALIAS LIST
AliasList[]=articleimage
AliasList[]=articleimage100x100
Solution: Just remove the AliasList[] declaration:
[AliasSettings]
#AliasList[] <------ COMMENT OUT
AliasList[]=articleimage
AliasList[]=articleimage100x100
<b>What I'm wondering:</b> In ez 4.1.0 / ezOE 5.0.0 I had the same declaration as here in ez 4.1.1 / ezOE 5.0.1, and there I had no problems.... Andre, thanks a lot for your support!!
Cheers, Michael
|