@Yannick-Deslandes said in Facebook sharing always showing author avatar's picture:
I just want the correct pitcture of the post insttead of the author's avatar...
That's not what we get. We get what you don't want. I want what you want.
We've been building using this forum software (which, by the way, I think is the best-looking forums out there), and most of our designing had been done on a Linux machine, where everything worked fine. However, when we moved to the final server, a Windows Server 2008 R2 machine, whenever I try to change the profile picture of anyone, this happens.
I don't know whether it's a problem with Windows node.js or with NodeBB, but we need this fixed soon, and if anyone has any ideas, they'd be greatly appreciated. Thanks!
That error seems to be coming from the gm module, at
https://github.com/NodeBB/NodeBB/blob/master/src/image.js#L18 and
https://github.com/NodeBB/NodeBB/blob/master/src/image.js#L23, not sure how compatible they are on windows, you can try commenting out those resize lines and see if uploads work.
I RDP in as Administrator (not very secure, I know, we're going to disable it before going live), so the command prompt runs as admin every time. I tried changing the permissions of the folder it says in the error, but that didn't change anything. I even ran a fresh install of NodeBB, but that had no effect either. At this point what we're gonna do is just run it on a small Linux box.
I can't blame you; Windows can be pretty finicky sometimes. If you have UAC enabled, I think you might still have to specify that you want to run your command prompt in Administrator mode. I'd double check that just to make sure.
I found someone who was having somewhat similar problems with node's GraphicsMagick (gm) plugin on StackOverflow and it looks like their solution involved changing require('gm').subClass({imageMagick:true})
to require('gm')
, as well as running node from Administrator mode.
Looks like a permissions error, but their solution is to use require('gm').subClass({ imageMagick : true})
.
Maybe Linux is the answer for you after all!
I've managed to reproduce the issue on Win2k8R2. It's coming from ImageMagick not being installed/configured correctly.
These are the steps I took to fix the issue:
Go out and install the latest version of ImageMagick
After running the installer make sure that you close the command prompt from which you are running NodeBB.
Open a new command prompt and rerun node app.js
The problem should be fixed!