Photo lies after upload.

Tamás Varga Posted in Component Development 2 years ago

Photo stands on the computer. It lies down after charging, it does not look good. Resolution: 3744x4992. OSSN 6.1

Replies
Hungarian Tamás Varga Replied 2 years ago

I have disabled the components, the photo is not good, landscape.

German Michael Zülsdorff Replied 2 years ago

That's what you get when uploading your image to the test album?
And the image is still displaying in landscape format?

Temporarely disable the Marketplace and Files components and then upload your image again

Hungarian Tamás Varga Replied 2 years ago

Errorlog: [15-Apr-2022 09:35:04 UTC] PHP WARNING: 2022-04-15 09:35:04 (UTC): "Attempt to read property "guid" on bool" in file /home/elittagh/publichtml/components/MarketPlace/ossncom.php (line 54)
[15-Apr-2022 09:35:04 UTC] PHP WARNING: 2022-04-15 09:35:04 (UTC): "Attempt to read property "guid" on bool" in file /home/elittagh/public
html/components/Files/ossn_com.php (line 39)

German Michael Zülsdorff Replied 2 years ago

Here are the 3 lines again, so you can simply copy/paste them

error_log('------------------------------------------');
error_log('ORIGINAL IMAGE ' . ossn_dump($exif));
error_log('ROTATED IMAGE ' . ossn_dump(exif_read_data($filename)));
German Michael Zülsdorff Replied 2 years ago

So the only way to investigate is adding some debugging code, I think
To prepare:

  • login to your site
  • from your admin dashboard set Site Settings -> Basic -> Error Reporting ->On
  • create a new Ossn photo album to upload your photo later
  • maybe instruct your other members not to do any image uploads while you are testing

Now login to your site's cpanel ....

  • enter the directory named classes
  • make a backup of OssnFile.php
  • open OssnFile.php with a texteditor
  • add the three error_log .... lines as I did in the screenshot

enter image description here

  • save the changed OssnFile.php

Now inside your site,

  • upload the test photo to your formerly created Ossn album

From cpanel

  • open the file named error_log
  • provide the log starting with '---------------------------------------------'
  • replace the changed OssnFile.php by the backup you made
Hungarian Tamás Varga Replied 2 years ago

Ossn main directory of the photo, chrome correctly opens, stands the photo.

German Michael Zülsdorff Replied 2 years ago

Confirmed correct display on 2 of my sites (Ossn 6.0 and Ossn 6.2dev)

Looks like an exif issue:
The original image is 4992x3744 landscape format, but rotated 90°CW via exif to portrait 3744x4992
Thus, somewhere this information seems to get lost ... or maybe ignored by a browser?

As a first check I'd suggest Tamas to upload the original file via FTP to the Ossn main directory
and view it with the same device and tell us the result.

Indonesian Arsalan Shah Replied 2 years ago

Tested on v6.2-dev it works fine , not sure about v6.1 LTS yet I will test

enter image description here

Indonesian Arsalan Shah Replied 2 years ago

Can you send me the original photo in zip file, and share download link here.

Premium Version

Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.

$199 (Life Time)
Learn More

Other Questions