This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Jesus

  • ***
  • 38 posts
Error with profile picture plugin
« on: September 08, 2019, 05:35:57 PM »
The plugin works well when uploading and displaying the profile photos, the problem is when the user "changes" the photo, the "new" is uploaded but the old "deleted" photo is displayed (technically never deleted) and never shown the new profile picture, always the old one

*

MB Themes

Re: Error with profile picture plugin
« Reply #1 on: September 09, 2019, 01:44:30 PM »
@Jesus
As new image has same name as old one, you must clear browser cache to show newly uploaded image in user profile
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Jesus

  • ***
  • 38 posts
Re: Error with profile picture plugin
« Reply #2 on: September 09, 2019, 02:20:54 PM »
@Jesus
As new image has same name as old one, you must clear browser cache to show newly uploaded image in user profile


I thought it was that, but no, I've tried it in different browsers and it doesn't work, the first photo the user uploaded is always shown

I speak of the profile picture that is seen in the items, the old one is always seen and never the new one (although it is seen in the user's dashboard) in the items only the old one is shown

*

MB Themes

Re: Error with profile picture plugin
« Reply #3 on: September 09, 2019, 02:56:14 PM »
I am not able to reproduce such problem
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Jesus

  • ***
  • 38 posts
Re: Error with profile picture plugin
« Reply #4 on: September 13, 2019, 12:42:49 AM »
After days looking for what to do I found the problem, Cloudflare! :o
if I do not purge the cache, the profile photo changes "Fast" are not effective

What could I do to make Cloudflare not give me that problem with the plugin?  ;D




*

MB Themes

Re: Error with profile picture plugin
« Reply #5 on: September 13, 2019, 07:47:04 AM »
@Jesus
That is good question on cloudfare, but when you are caching, then you are caching...
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Jesus

  • ***
  • 38 posts
Re: Error with profile picture plugin
« Reply #6 on: September 13, 2019, 10:47:35 PM »
I got how to fix it! I leave it here for everyone to know  ;D

in your account go to Cloudflare - Page Rules:

Create a Page Rule:

To write:   https://yourweb.com/oc-content/plugins/profile_picture/images/*         ("yourweb" change for your domain)


choose: Cache Level   -   Bypass

And save!

(I leave a capture of how it should be done)

Marked as best answer by jesus-manuel.curreri-scal on September 15, 2019, 12:18:21 PM
*

Jesus

  • ***
  • 38 posts
Re: Error with profile picture plugin
« Reply #7 on: September 13, 2019, 11:50:16 PM »
Do this (and cloudflare):

Go to functions.php

line: 952

before

echo '<div class="wrap">';

  echo '<div class="img">';
  echo '<div class="box"><img src="' . bet_profile_picture(osc_logged_user_id(), 'large') . '"/>

after:

  echo '<div class="wrap">';
  $today = date("d-m-Y H:i:s");
  echo '<div class="img">';
  echo '<div class="box"><img src="' . bet_profile_picture(osc_logged_user_id(), 'large') . '?'.urlencode($today).'"/></div>


Photography is always updated without problems!

*

Jesus

  • ***
  • 38 posts
Re: Error with profile picture plugin
« Reply #8 on: September 13, 2019, 11:56:58 PM »
@Jesus
That is good question on cloudfare, but when you are caching, then you are caching...

Do you think my solution is good ?, it is for the users dashboard!, so they change the profile photo quickly and without problems using cloudflare

*

MB Themes

Re: Error with profile picture plugin
« Reply #9 on: September 14, 2019, 01:36:21 PM »
It could work ok
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots