Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Strange bug which seems to happen randomly - I uploaded an image to a node, so that when I click "edit post" i see the following code:
[[wysiwyg_imageupload:2249:]]
When I view the posted node, there is a broken image icon - looking at the HTML source for the node, I see that [[wysiwyg_imageupload:2249:]] was converted to:
The correct URL though should be /sites/default/files/imagecache/Medium/Picture_032.jpg , though, correct? It seems strange for an image source to just be a directory -
Comments
Comment #1
newmediaist CreditAttribution: newmediaist commentedI forgot that the Drupal.org input filter "filters out" html =)
From my previous post, the input filter is converting [[wysiwyg_imageupload:2249:]] to:
Here is the entry from the database table wysiwyg_imageupload_entity
iid | fid | nid | cid | temporary | imagecache | style | title | alignment
2249 | 3383 | 0 | 0 | 1 | Medium | 0 | Picture_032.jpg | imgupl_floating_none
And here is where the file appears in the filesystem:
/sites/default/files/imagecache/Large/wysiwyg_imageupload/1694/Picture_032.jpg
/sites/default/files/imagecache/Medium/wysiwyg_imageupload/1694/Picture_032.jpg
/sites/default/files/imagecache/wysiwyg_imageupload_preview/wysiwyg_imageupload/1694/Picture_032.jpg
I should also note that the images uploaded fine initially, and displayed fine initially as well - although we haven't done anything to the site in the last 24h, it appears as though they just stopped working (very suspicious) - probably after the next CRON run (just a guess)
Also, in the wysiwyg database table, what does "Temporary" mean, and why is it set to 1?
Comment #2
EugenMayer CreditAttribution: EugenMayer commentedWell your suggestion is correct.
temp is set on the initial upload. Until you dont save the node, the file will stay temp and will be removed after cache expire. On save though, the file will get permanent.
So it seems we have antoher issue where nodeapi save handler is not called, though the images stay temporary. Thats why your files are not working "randomly", or more precise after the cache clear.
What kind of nodes did you add those images too?
To be exact, after saving a node, every entry in the db for that node must have temp=0 - otherwise those images get removed.
I really have to thank you, its very rare that someone gives so detailed informations for debugging and actuall puts his own time into the issue before opening. Very apritiated.
Comment #3
newmediaist CreditAttribution: newmediaist commentedNo problem - I have to thank you for writing this module, and putting your time into it!
Node type was Forum post. I've also run into this issue with CCK nodes as well.
Comment #4
EugenMayer CreditAttribution: EugenMayer commentedWell i guess you have to debug it, as i cant properly reproduce it here.
We have to debug 2 things, or better, we could have to places of failure:
I guess you have to place some dpm() and see, what fails. Be sure to use the user, which caused the problem with other nodes before and grant him devel rights ( it could also be permissions related )
Comment #5
newmediaist CreditAttribution: newmediaist commentedI'm having trouble recreating the "Temp=1" problem - every image I upload is changing to "Temp=0" after saving... the strange thing is this problem is now occurring on two sites of mine, each of which have different module setups, but sit on the same server.
By the way - does this bug mean the images which were uploaded are now lost? It sounds like the source files are being deleted by the cronjob unless temporary=0...
And on a semi-related note, I also noticed looking through the database that every single picture has two entries in wysiwyg_imageupload_entity - one which has the imagecache, style & alignment blank, and one which has is set to whatever the default settings are. Is it supposed to work that way?
Comment #6
EugenMayer CreditAttribution: EugenMayer commentedWell yes, this is getting ugly.
Well also the files are temporary uplaoded, that means they will get deleted by drupals file api during cron, thats rights (thats actually the idea of those temporary files).
No there should not be 2 entries for each picture until you dont use it twice. Every usage of a picture is an entry. ( Even in the same node ). So if you only have one usage of that picutre in one node, there should be exactly one entry. If thats not the case, that could be the path of the error probably.
Comment #7
EugenMayer CreditAttribution: EugenMayer commentedWell just to give you a checklist for reproduction:
Its important to test all cases, because they need to be covered due to very ugly form-api edgecases. Read about them in http://github.com/EugenMayer/wysiwyg_imageupload/blob/master/wysiwyg_ima...
Thats actually the issue i wait to be cleared before the 2.1 release, which currently only has very minor corrections and a new feature ( inline resizing ). This issue could be a major though
Comment #8
newmediaist CreditAttribution: newmediaist commentedOk - Regarding the "Create two rows in database" bug - Using Google Chrome w/CKEditor 3.3.1.5586 , logged in as a normal user w/ proper permissions:
1) Click the WYSIWYG Image Upload Icon
2) Click "Choose File". The Preview is shown, and TWO entries are added to wysiwyg_image_uploade_entity:
192 186 0 0 1 file1.jpg
193 186 0 0 1 file1.jpg
3) Click "Insert", and One of the Two entries are updated as follows:
192 186 0 0 1 file1.jpg
193 186 0 0 1 Large 0 file1.jpg imgupl_floating_none
(If I change the title of the image from the default file name BEFORE click Insert, then in the earlier record (192) it shows the file name, while in the secondary record (193) it shows the new updated title i entered)
4) Click "Save", and the following is the file rows left in the database
192 186 67 0 0 file1.jpg
193 186 67 0 0 Large 0 file1.jpg imgupl_floating_none
I cannot seem to trigger a scenario where two entries are not created - very strange!
Comment #9
EugenMayer CreditAttribution: EugenMayer commentedThanks for the investigation, iam looking into that using a fresh install. Maybe i find time today
Comment #10
EugenMayer CreditAttribution: EugenMayer commentedFinally i have fount time to get into this. A very odd behaivor of the drupal menu API was the cause mainly.
http://github.com/EugenMayer/wysiwyg_imageupload/commit/a91f2212ca68944d...
http://github.com/EugenMayer/wysiwyg_imageupload/commit/abf1577172b5147e...
should be working in the github master already and will be included in 2.2.
reopen if this still does not work out
Comment #11
newmediaist CreditAttribution: newmediaist commentedThanks, installed the update today hopefully it fixed the problem!
Comment #12
newmediaist CreditAttribution: newmediaist commentedInstalled the newest version, problem is still there... with "Temp=1" and images randomly getting deleted after CRON runs :( Big issue of course as it means when I update articles, I have to check back 24-48h laters to make sure the images "stick" and don't turn into Red X's. Unfortunately though I have no idea what is causing this issue, as it seems to be happening somewhat randomly even on clean installs, even on clean servers (i.e. - I am unable to trigger it manually so am having difficulty providing debug information)
It even seems to occur sometimes in scenarios where no special actions are taken - i.e. when you create a new node, insert and image, and just hit save.
Has anyone else experienced this problem, or is it just happening to me?
(*message updated with more info)
Comment #13
EugenMayer CreditAttribution: EugenMayer commentedWell i need more informations. I def. fixed the "double entry" issue and at least on of those missing nodeapi procedures.
Comment #14
EugenMayer CreditAttribution: EugenMayer commentedI guess thats you site : http://bulldogsworld.com/f/general-bulldog-forum/were-very-sorry-about-a...
If yes, well seems like you dont need any help anymore. Pretty disapointed about your way to communicate there, sounds like i never responded and you are not responsible for anything you do on your site.
Comment #15
cregar CreditAttribution: cregar commentedI have the same issue.
When i add an image to a node (node-type "blog") the image is not shown on the posted node (instead a text like this: "[[wysiwyg_imageupload:4:]]"). When i click on "edit post" everything is working fine. So i can see the image during the upload process and in my body text.
My database table "wysiwyg_imageupload_entity" has the following entry:
iid | fid | nid | cid | temporary | imagecache | style | title | alignment
4 2761 854 0 0 Big 0 picture.jpg imgupl_floating_none
Thanks for help.
Comment #16
EugenMayer CreditAttribution: EugenMayer commentedCregar your issue is totaly different...
read the installation docs and activate the Drupal Wiki Inlne Image input filter...
Comment #17
onewayticket CreditAttribution: onewayticket commentedUnfortunately, I'm running version 6.x.2.2 and the problem that newmediaist found is still occurring as far as I can see it. I get these sort of URLs http://www.mysite.co.uk/sites/default/files/imagecache/width_640px/ which is missing the filename and sub-directories.
The image uploads fine to the server and is shown on the preview. It even saves the page correctly but then a day later the images are missing and I have to upload them again. There appears to be problems with cron and saving the file. I've been running my server to update cron every 5 minutes which could have something to do with it. It also seems to happen more with new pages, rather than pages already saved which is weird. Makes me think that if the cron runs too frequently and you haven't saved the page, then it loses the URL information.
I'd really appreciate some advice on the issue as it's really bothering me. Thanks for the module btw!
Comment #18
EugenMayer CreditAttribution: EugenMayer commentedwell i found an issue which will be released in 2.2 but iam still not 100% it covers the edge case. The problem is, its really hard to reproduce.
Comment #19
EugenMayer CreditAttribution: EugenMayer commentedFinally i found it, iam pretty sure. Its bound to the way i set the cace (CACHE_TEMPORARY) and the timing when a cron runs. I changed the form cache to be permanent and delete it when i save the node in the nodeapi.
There was alos a browser bug which could cause this.
Comment #20
onewayticket CreditAttribution: onewayticket commentedThanks for all your effort in helping me out EugenMayer. Just noticed the new 2.3 version on the site, so I guess this will have the fix included? Thanks again, really appreciate this bug fix. Drupal without an image uploader in the WYSIWYG is so frustrating.
Comment #21
EugenMayer CreditAttribution: EugenMayer commentedYes 2.3 includes this
Comment #23
Erika123 CreditAttribution: Erika123 commentedThis seems to be the same problem, but I don't really understand what is said in much of the comments above, and I'm not sure if I should create a new issue or use this one.
After clicking on browse and selecting the file, the "Image Details" panel shows a number (eg 133) the alternative text for the image.
At that point the file has actually been placed into sites/default/files/wysiwig_imageupload/ (followed by [uid]/filename.jpg)
When I click "Insert" there is a broken image picture. When I click on it and select "Image Properties" it shows that it is looking at the url sites/default/files/imagecache/600px_wide/wysiwyg_imageupload/1/filename.jpg
When I save and then edit, then look at the content without rich text, it shows: [[wysiwyg_imageupload:133:]]
Using drupal 6.19
wysiwig image upload 6.x 2.8
jquery update 1.3.2 in status report, ( module 6.x-2.0-alpha1)
jquery ui 1.7.3 (6.x 1.4)
Jquery UI Dialog 6.x-1.10
Thank you for the great module, it really makes it easy for clients! I did have it working up to a few months ago, and I'm not sure what happened so that now it doesn't work. I updated to a different server, but the hosting company said that they checked the permissions.
Comment #24
EugenMayer CreditAttribution: EugenMayer commentedOpen a new issue, describe detailed what happens, maybe include Screenshots. Thanks
Comment #25
boftx CreditAttribution: boftx commentedThe maintainer of this module clearly has no sympathy for new users or even for those who WANT this module to work.
I encountered the same that many are reporting, and after reading his replies I have deleted the package from my system and will go with something else. I am a software engineer by trade whose main area of expertise in a language other than PHP.
I find Eugen Mayer's responses and attitude to all of you to be inexcusable and I strongly you to use a different package.
Comment #26
EugenMayer CreditAttribution: EugenMayer commentedBotfx do you actually maintain any modules?
Do you
You have absolutely no respect for the work a maintainer does while developing and maintaining the module, developing features and ASK support questions he should actually not care at all? Why should he even ask and help others debug there system to find out the have memory usage problems, crappy modules installed braking X, Y, Z or similar? Do you really think thats the correct way to go? Could it be rather the case, that its the _developer_ of the site, whos job that is? Isnt it what he gets money for, not me? Is that what he is resposible to and what he admitted to when using open source software?
If you think you can do it any better, go forward. But pissing on other persons shoes without having a slightly clue about what they do is most probably the wrong way.
Do you really think _I_ need you to use this module? Or might it the other way arround, i give you the oppertunity to use the module as i released it and maintain it for the wide range of users?
No comment.
Comment #27
blueprint CreditAttribution: blueprint commentedAs I've mentioned elsewhere: 1. Well written and complete instructions that non-cli users can follow and the drush make works! Yipee. I was really tired of imce and the bridge ...