Advertisement:

Author Topic: Automatic Attachment Rotation (and Resize)  (Read 35023 times)

Offline GL700Wing

  • Full Member
  • ***
  • Posts: 437
  • Gender: Female
Re: Automatic Attachment Rotation (and Resize)
« Reply #200 on: May 16, 2018, 08:18:21 AM »
Hi.. Thanks.  It was at 128, I've tried 256 and 512 but it still does the same thing.  As soon as I turn off "automatically rotate" it lets it upload, and I can then still manually rotate it no problem (in fact it does it instantly)..
Have you tried adjusting the settings in the php.ini file for the forum?

These are the settings I'm using for the forum on the higher spec shared server:
memory_limit = 512M
post_max_size = 64M
upload_max_filesize = 64M


Offline GL700Wing

  • Full Member
  • ***
  • Posts: 437
  • Gender: Female
Re: Automatic Attachment Rotation (and Resize)
« Reply #201 on: May 16, 2018, 08:27:13 AM »
Also seeing this error lots of times, but only for guests :-

https://www.theqe2story.com/forum/index.php?topic=6455.0
8: Undefined variable: mp
File: /home/theqesto/public_html/forum/Sources/Class-exifReader.php
Line: 1201
I've never seen that error and I'm unable to reproduce it but if you make the following change to line 1201 of ./Sources/Class-exifReader.php it should fix the problem:

Find:
Code: [Select]
$this->ImageInfo['h']["customRendered"] = ($mp == 0) ? 'Normal Process' : ($mp == 1 ? 'Custom Process' : 'Reserved');
Replace With:
Code: [Select]
$this->ImageInfo['h']["customRendered"] = (!isset($mp) || $mp == 0) ? 'Normal Process' : ($mp == 1 ? 'Custom Process' : 'Reserved');
The change basically makes 'Normal Process' the default value (and this is actually the default value for "customRendered") if '$mp" has not already been defined.

If you can test/confirm this fix I'll include it in the next version.


Offline The QE2 Story Forum

  • Charter Member
  • Jr. Member
  • *
  • Posts: 148
    • The QE2 Story
Re: Automatic Attachment Rotation (and Resize)
« Reply #202 on: May 17, 2018, 06:04:19 PM »
HI there,

I did your suggested change a few hours ago, and am not seeing any errors now.

Cheers,

- Rob

Offline GL700Wing

  • Full Member
  • ***
  • Posts: 437
  • Gender: Female
Re: Automatic Attachment Rotation (and Resize)
« Reply #203 on: May 17, 2018, 07:06:46 PM »
I did your suggested change a few hours ago, and am not seeing any errors now.
Thanks - I'll include this fix in the next update.

BTW - You can leave this fix in place until then as it won't generate any errors in relation to ./Sources/Class-exifReader.php when the current version of the mod is uninstalled as it deletes that file completely.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,729
  • Mod King
    • XPtsp.com Community
Re: Automatic Attachment Rotation (and Resize)
« Reply #204 on: May 21, 2018, 11:23:12 PM »
Uploaded v5.6 - May 21st, 2018
o Fixed undefined variable error in Class-exifReader.php.



Replace With:
Code: [Select]
$this->ImageInfo['h']["customRendered"] = (!isset($mp) || $mp == 0) ? 'Normal Process' : ($mp == 1 ? 'Custom Process' : 'Reserved');
I just looked at the code.  Nowhere else is the $mp variable used.  So it should probably read like this:
Code: [Select]
$this->ImageInfo['h']["customRendered"] = (empty($tmp) ? 'Normal Process' : ($tmp == 1 ? 'Custom Process' : 'Reserved'));The empty function also catches if the variable isn't defined.  When your statement is replaced with my above code, this SHOULDN'T happen....

I've integrated this change into this version.  Hopefully, it'll help with the mod....  :P ::)

Offline dan4ever

  • Jr. Member
  • **
  • Posts: 106
  • Gender: Male
  • SMF 2.0.11
Re: Automatic Attachment Rotation (and Resize)
« Reply #205 on: June 09, 2018, 01:50:46 PM »

Hi


Still getting this error:
8: Undefined offset: 9
Fil: /home4/*****/forum/Sources/Display.php
Rad: 1339


Looks like this:
   list ($id_folder, $real_filename, $file_hash, $file_ext, $id_attach, $attachment_type, $mime_type, $is_approved, $id_member, $proper_rotation) = $smcFunc['db_fetch_row']($request);




Something work around maybe?
have 5.5 will upgrade soon


/Dan
/Dan Ohlsson, Admin at http://www.guldforum.se

Offline GL700Wing

  • Full Member
  • ***
  • Posts: 437
  • Gender: Female
Re: Automatic Attachment Rotation (and Resize)
« Reply #206 on: June 09, 2018, 08:26:11 PM »
Still getting this error:
8: Undefined offset: 9
Fil: /home4/*****/forum/Sources/Display.php
Rad: 1339

Looks like this:
   list ($id_folder, $real_filename, $file_hash, $file_ext, $id_attach, $attachment_type, $mime_type, $is_approved, $id_member, $proper_rotation) = $smcFunc['db_fetch_row']($request);

Does line 1325 (or a line very close to this number) in your ./Sources/Display.php look like this?
Code: [Select]
SELECT a.id_folder, a.filename, a.file_hash, a.fileext, a.id_attach, a.attachment_type, a.mime_type, a.approved, m.id_member, a.proper_rotation

Offline dan4ever

  • Jr. Member
  • **
  • Posts: 106
  • Gender: Male
  • SMF 2.0.11
Re: Automatic Attachment Rotation (and Resize)
« Reply #207 on: June 10, 2018, 07:31:15 AM »

Yes!

SELECT a.id_folder, a.filename, a.file_hash, a.fileext, a.id_attach, a.attachment_type, a.mime_type, a.approved, m.id_member, a.proper_rotation


/Dan
« Last Edit: June 10, 2018, 07:44:53 AM by dan4ever »
/Dan Ohlsson, Admin at http://www.guldforum.se

Offline GL700Wing

  • Full Member
  • ***
  • Posts: 437
  • Gender: Female
Re: Automatic Attachment Rotation (and Resize)
« Reply #208 on: June 10, 2018, 07:18:53 PM »
Yes!
Ok - we’ll I don’t know why those errors are being generated on your forum.  However, given this issue has not been reported previously you could try uninstalling the version you currently have installed (making to sure to fix any uninstall errors) and then install the latest version.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,729
  • Mod King
    • XPtsp.com Community
Re: Automatic Attachment Rotation (and Resize)
« Reply #209 on: October 10, 2018, 11:25:47 AM »
Uploaded v5.7 - October 10th, 2018
o No functionality change.
o Updated documentation to point to new website.



@dan4ever:  Sorry to reply so late after your bug report, but did upgrading to v5.6 solve your issue?