Closed (duplicate)
Project:
Asset
Version:
5.x-1.x-dev
Component:
User interface (Asset wizard)
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Jan 2008 at 17:49 UTC
Updated:
24 Jan 2008 at 13:19 UTC
I'm no expert, but while testing the dev version of asset I kept getting a blank screen after clicking the Finish submit button. My code was not getting into the node and tinymce editor.
I solved it by removing line 275-304 in asset_wizard.inc :
// Preview the image
if(in_array($a->extension, $is_image)) {
if(variable_get('asset_imagecache', 0)) {
$presets = _imagecache_get_presets();
$preset = $presets[variable_get('asset_imagecache', 0)];
$preview = theme('imagecache', $preset, str_replace("//","/", $a->filepath));
}
else {
$asset = array(
'aid' => $macro['aid'],
'format' => 'image',
'formatter' => 'asset',
'width' => '120',
'height' => '80',
);
$preview = asset_render_macro($asset);
}
}
// Try to auto-detect the format
else {
$preview = asset_preview($macro['aid']);
}
$form['preview'] = array(
'#type'=>'hidden',
'#value' => $preview,
);
$form['author'] = array(
'#type' => 'hidden',
'#value' => $a->author,
);This suggests there is a bug in this piece of code??
Comments
Comment #1
wmostrey commentedNot sure if that deducation is correct. When you have the blank page, do a view source. Do you see some javascript code there? Did you put the code from this comment in
tinymce/plugin_reg.php?Comment #2
sijuwi commentedI believe I did add the code, though I'll have to double check and get back to you. The page is completely blan without any code in the source at all.
Thanks for all the work you've put in, I do the website at http://www.torturecare.org.uk and found this module very useful!
Comment #3
sijuwi commentedI confirm that I did indeed put that code in modules/tinymce/plugin_reg.php.
Comment #4
wmostrey commentedSujuwi, so you're following these two steps from the asset documentation: Integrating with TinyMCE? It's weird that the page source is completely blank. If there would be javascript in there, it would be a script clash. Could you check your server's error log for clues around this? Does it get filled when you that action?
Comment #5
sijuwi commentedYes I have followed the exact procedure to intergrate with TinyMCE. But I'm not sure how the issue is related to Tinymce, since the intergration is working fine, it seems the asset wizard popup sequence isn't running through correctly for that dev version off asset.
Since I noticed you have made some updates I decided to start from scratch with the latest dev version on a 5.2 version of drupal.
I uploaded both a .flv file and a mp3 file and went through the whole asset wizard sequences to the tinymce editor successfully.
There seems to be some minor unrelated issues afterwards in the node itself, where the sizing of the swfobject is lost in subsequent edits of the node, and placing a .flv file and .mp3 file together in a node cause some problems where one or the other will show up only as a placeholder.
Comment #6
yched commentedit seems the asset wizard popup sequence isn't running through correctly for that dev version off asset
(...)
There seems to be some minor unrelated issues afterwards in the node itself, where the sizing of the swfobject is lost in subsequent edits of the node
I'm seeing this sort of behavior too - not sure whether it's really related or not :
When inserting an asset in a textarea, the settings on the last step of the wizard (image size, alignment...) are simply overlooked, and not reflected in the generated macro.
Happens both through the tinyMCE plugin and through regular textfields 'Insert assets' link.
Comment #7
wmostrey commentedWhen using TinyMCE, and then editing an asset you just entered, does it take into account the last step of the wizard then? For instance if you change the width and height, does this reflect in the WYSIWYG?
Comment #8
wmostrey commentedI should add that I'm not able to reproduce the error in which the final step is being ignored. When I add an asset using TinyMCE, CCK or the "Insert assets" link the width, height, alignment et al is being inserted correctly. Also when I edit the new asset and change these settings, this change is reflected.
Comment #9
yched commented#7 : yes, I also reproduce when editing an already inserted asset in tinyMCE
#8 : then it might be another occurrence of the 'webroot' issue (http://drupal.org/node/207976) ?
Comment #10
yched commented@wmostrey : OK, awfully sorry, this was caused by my own messing with asset.js, as a result of http://drupal.org/node/213295 (I left in the
$("#edit-finish").click(insertToEditor);line, which is commented out in CVS)Sorry for the false positive, and for hijacking the original issue.
Comment #11
wmostrey commentedThanks for your confirmation yched. The remaining issue here is a duplicate of http://drupal.org/node/208489