wpDiscuz 7 Beta Version is Released!

 

Today, on 01.20.2020 we’re excited to release wpDiscuz 7 Beta 1 into the wild!
The version 7 has been in development since December 2018. About one year of hard work is ready to be tested. It’s hard to believe it’s been so long since our last major v5 release, but sometimes good things are worth waiting for.

Try wpDiscuz 7 Beta 1

500 Error with admin-ajax.php  

Page 2 / 2

webgrimm
Posts: 8
Customer
(@webgrimm)
Member
Joined: 1 year ago

Cant upload images with Media Uploader. admin-ajax.php throw a 500 error

PHP-Logfile:

[09-Jun-2019 07:54:06 UTC] PHP Fatal error: Uncaught Error: Call to undefined function exif_read_data() in X:\www\wp-content\plugins\wpdiscuz-media-uploader\includes\class.WMUHelper.php:461
Stack trace:
#0 X:\www\wp-content\plugins\wpdiscuz-media-uploader\class.WpdiscuzMediaUploader.php(480): WMUHelper->imageFixOrientation('X:\\xxx\\php5...')
#1 X:\www\wp-content\plugins\wpdiscuz-media-uploader\class.WpdiscuzMediaUploader.php(452): WpdiscuzMediaUploader->uploadSingleFile('wmu_images', 109, 'attachment_imag...', 0, 'test.jpg')
#2 X:\www\wp-includes\class-wp-hook.php(288): WpdiscuzMediaUploader->uploadFiles(109)
#3 X:\www\wp-includes\class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#4 X:\www\wp-includes\plugin.php(465): WP_Hook->do_action(Array)
#5 X:\www\wp-includes\comment.php(2134): do_action('comment_post', 109, 0, Array)
#6 X:\www\wp-con in X:\www\wp-content\plugins\wpdiscuz-media-uploader\includes\class.WMUHelper.php on line 461

12 Replies
webgrimm
Posts: 8
Customer
(@webgrimm)
Member
Joined: 1 year ago

Have testet, it's a problem of jpg-files

Have transformed a jpg to png (see my last post) and it worked

Reply
4 Replies
Astghik
Admin
(@astghik)
Joined: 2 years ago

Support Team
Posts: 3513

Yes @webgrimm, I see. 

I've already asked the add-on developers about the issue. They are going to check it. Please wait for a while I'll update the topic asap. 

Reply
Astghik
Admin
(@astghik)
Joined: 2 years ago

Support Team
Posts: 3513

@webgrimm,

Could you please provide us the admin login details for deeper support? 

Reply
webgrimm
Customer
(@webgrimm)
Joined: 1 year ago

Member
Posts: 8

Have made a copy of the Website.

Your Email adress for Admin-account?

Reply
Astghik
Admin
(@astghik)
Joined: 2 years ago

Support Team
Posts: 3513

ok @webgrimm,

please send the login details to info[at]gvectors.com email address. 

Reply
Astghik
Posts: 3513
Admin
(@astghik)
Support Team
Joined: 2 years ago

@webgrimm,

Please follow the steps below:

1. Open the class.WMUHelper.php file in /wp-content/plugins/wpdiscuz-media-uploader/includes/ folder

2. go to line 460 

3. Find the imageFixOrientation function and replace with the following one: 

public function imageFixOrientation($filename) {
if (function_exists('exif_read_data')) {
$exif = exif_read_data($filename);
if (!empty($exif['Orientation'])) {
$image = imagecreatefromjpeg($filename);
switch ($exif['Orientation']) {
case 3:
$image = imagerotate($image, 180, 0);
break;
case 6:
$image = imagerotate($image, -90, 0);
break;
case 8:
$image = imagerotate($image, 90, 0);
break;
}
imagejpeg($image, $filename, 90);
}
}
}

I'd also recommend you install the exif library, as the wpDiscuz Media Uploader add-on uses exif library so as to allow images to be uploaded in the right way. For example, if you take a photo with IOS it rotates when you publish the comments.

Reply
Page 2 / 2
Share:
Green
Default
Pear
Black Emo
{green}:grinning:
{green}:wink:
{green}:face:
{green}:inlove:
{green}:sweaty:
{green}:surprised:
{green}:lovekiss:
{green}:laugh:
{green}:formalsmile:
{green}:displeased:
{green}:cool:
{green}:resent:
{green}:nerd:
{green}:screaming:
{green}:amazed:
{green}:sad:
{green}:deceitful:
{green}:starryeyes:
{green}:evil:
{green}:shocked:
{green}:tears:
{green}:sulky:
{green}:smile:
{green}:vomited:
{green}:hi:
{green}:afraid:
{green}:crazy:
{green}:rabid:
{green}:fighting:
{green}:nonoise:
{green}:blushed:
{green}:idontknow:
{green}:scared:
{green}:razz:
{green}:kiss:
{green}:eat:
{green}:shutmouth:
{green}:gape:
{green}:suspicious:
{green}:laughingoutloud:
{green}:bruise:
{green}:crying:
{green}:pray:
{green}:serious:
{green}:excitement:
:)
:d
:wink:
:mrgreen:
:neutral:
:twisted:
:arrow:
:shock:
:???:
:cool:
:evil:
:oops:
:razz:
:roll:
:cry:
:eek:
:lol:
:mad:
:sad:
:!:
:?:
:idea:
:hmm:
:beg:
:whew:
:chuckle:
:silly:
:envy:
:shutmouth:
{pear}:happy:
{pear}:smile:
{pear}:laugh:
{pear}:laughingoutloud:
{pear}:crying:
{pear}:exhausted:
{pear}:nerd:
{pear}:surprised:
{pear}:veryhungry:
{pear}:wink:
{blackemo}:laughtertotears:
{blackemo}:gift:
{blackemo}:love:
{blackemo}:inlove:
{blackemo}:shamefaced:
{blackemo}:heart:
{blackemo}:crazy:
{blackemo}:anguished:
{blackemo}:bruise:
{blackemo}:easymoney:
{blackemo}:exhausted:
{blackemo}:vampire:
{blackemo}:shutmouth:
{blackemo}:wink:
{blackemo}:carnival:
{blackemo}:flowers:
{blackemo}:hotdrink:
{blackemo}:party: