We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Problem Uploading photos from mobile version | Forum

Juan
Juan May 12 '16
Hello everybody

I'm trying Oxwall. Everything looks to work fine, just my problem is that when I post a photo in the newsfeed from destktop version it works like its supposed to be. But when I post a photo in the newsfeed from mobile version a few ours later it is deleted!

I guess it is something about the cron jobs. I've been trying lots of posts from this forum and reading and I can't find an explanation about that weird behavior.

I hope you can help me.
Juan
Juan May 12 '16
Checking the DB I found that when I post a photo from the mobile version, the attachment gets the field status=0 and the field bundle=NULL

Some idea how to fix it?
ross Team
ross May 13 '16
We can't reproduce this issue on our side. 

Do you paste in group newsfeed or somewhere else? 
What is your software version and newfseed plugin version? 

Share your url please

ross Team
ross May 13 '16
Juan
Juan May 13 '16

Quote from ross We can't reproduce this issue on our side. 

Do you paste in group newsfeed or somewhere else? 
What is your software version and newfseed plugin version? 

Share your url please


Plataform version 1.8.2 (build 10400).
All plugins updated to recent version.
Spanish translated.
Theme Origin.

And the trouble is posting the photo in the main newsfeed:

http://www.jardinesdemorelos.com/dashboard

You can see a couple of broken links that was images posted from mobile version.
ross Team
ross May 16 '16
Ok, I uploaded a photo via mobile version. I'll check your website in a couple of hours. 
Attachments:
  photo1.jpg (242Kb)
  photo.jpg (433Kb)
Juan
Juan May 16 '16

Quote from ross Ok, I uploaded a photo via mobile version. I'll check your website in a couple of hours. 


I've made a patch for ow_base_attachment controled by a cronjob to fix it.
Just change status=0 to 1 and random value for bundle.
Maybe is not the best solution but it seems to work.
Juan
Juan May 16 '16

Quote from ross Ok, I uploaded a photo via mobile version. I'll check your website in a couple of hours. 


Your post DB data:

{"content":{"format":"image","vars":{"status":"","title":null,"description":null,"url":null,"image":"http:\/\/www.jardinesdemorelos.com\/ow_userfiles\/plugins\/base\/attachments\/57396102984d6_event-3.jpg"}},"attachmentId":null,"statusId":137,"status":"","contentImage":"http:\/\/www.jardinesdemorelos.com\/ow_userfiles\/plugins\/base\/attachments\/57396102984d6_event-3.jpg","view":{"iconClass":"ow_ic_comment"},"data":{"userId":56,"status":""},"actionDto":null}
ross Team
ross May 16 '16
Juan, what exactly your patch is. Where did you apply it in what file? Please provide the code here, I'll pass it to the devs they will shed some light on the issue. 
Juan
Juan May 17 '16

Quote from ross Juan, what exactly your patch is. Where did you apply it in what file? Please provide the code here, I'll pass it to the devs they will shed some light on the issue. 


I've made a little script called fotos.php, put it into /ow_cron, fixed a new cronjob in my host for every two ours to run it. My script just looks into ow_base_attachment for those attachments with status!=1 and bundle=NULL. Change the status to 1 and put bundle = "nfa-feed1"+10 random characters.

When you upload some image/photo from newsfeed from mobile version status gets 0 and bundle = NULL
ross Team
ross May 18 '16
Ok, please give me sometime to reproduce the issue on our side. I'll get back to you asap. 
ross Team
ross May 18 '16
Look, the photo of MJ it was uploaded via mobile two hours ago and it's still there. Cron runs every minute. Can you please revert the changes you did and provide access details to your cpanel and admin access details to the website? I'll take a look at the issue. 
Attachments:
  Screenshot from 2016-05-18 17:38:09.png (380Kb)
Juan
Juan May 20 '16

Quote from ross Look, the photo of MJ it was uploaded via mobile two hours ago and it's still there. Cron runs every minute. Can you please revert the changes you did and provide access details to your cpanel and admin access details to the website? I'll take a look at the issue. 


Oooh men. My mistake. I just updated my PHP. I was using 5.4, now I'm using 5.5. Now everything is sweet and charm.

Thank you very much Ross!

ross Team
ross May 20 '16
Great, thanks for letting us know. 
Juan
Juan May 20 '16
By the way, I converted my entire DB to InnoDB an it works just great!