Upload Photo Widget not showing for some users
-
We have recently had a problem with the “UpLoad Photos” widget not appearing for some users even though they are all the same user role.
We currently have 67 users on our site.
There are 61 galleries and 912 photos in the system.
We will be adding additional users and galleries to the system
We are using the Ultimate Member Version 2.1.15 pluginWhen an admin user logs into the front end of the website they can see the “Upload Photos” widget however the “Upload to gallery” selection dropdown only shows 60 galleries so any gallery beyond the 1st 60 cannot be selected.
When one of the artists logs into the site as a user if they are one of the users with one of the first 60 galleries then they will see the “Upload Photos” widget, however if they are the 61st or later gallery they will not see the widget.
We are using WordPress Version 5.6.1
We are using WP Photo Album Plus Version 7.6.08.010
We are using the theme: UM Theme Version 1.27Thanks,
John Novak
-
Finally fixed 7.6.09.001
Jacob,
I just did the upgrade on the site. Do I need to delete the wppa_child_list option again?
We have 65 galleries and when I login as an administrator and go to the “Upload Photos” widget only 52 galleries show up in the list.
thanks,
johnI guess not. If you look at the wppa log (Table VIII-C1) and you see:
Obs: on:09.02.2021 13:58:58: <username>: DB UPDATED
you do not need no action anymore.Jacob,
Also only the users with galleries that appear in the dropdown list show any images in their gallery on their Ultimate Member profile page.
thanks,
johnJacob,
I see that line toward the bottom of the log files but I see a lot of messages like the one below. Plus the album for bruce hartley is one of the users where the gallery on his profile page doesn’t show any images even though there are 23 in his gallery. Also, Bruc’s gallery is the 19th in the list on the Gallery Admin page with a Gallery Id of 100
url: /user/bruce+hartley/
wppa-items.php:822 wppa_cache_album() <- wppa-functions.php:659 wppa_get_album_item() <- wppa-filter.php:535 wppa_albums() <- shortcodes.php:343 wppa_shortcodes() <- do_shortcode_tag() <- shortcodes.php:218 preg_replace_callback() <- shortcode-handler.php(65) : eval()’d code:14 do_shortcode() <- shortcode-handler.php:65 eval() <- shortcodes.php:343 xyz_ips_display_content()
Dbg: on:09.02.2021 09:30:34: OCC-admin-42: Album 19 does not exist (cache album)Also when I go to Appearance -> Widgets and look at the WPPA+ Upload Photos widget I have as a Profile Sidebar widget I see all 65 galleries in the Gallery dropdown.
I did a comparison between the Gallery Admin page, the Upload Photos widget “Upload to Gallery” dropdown and the profile pages with no images shown and found an interesting pattern. All the galleries with the problem had a zero in the Gallery Id. All the galleries with no zero in the Gallery Id had no problem. The problem Gallery Id’s were: 70 80 100 101 102 103 108 109 110 140 150 160. There were no galleries with a zero in the Gallery Id that worked properly.
john
- This reply was modified 3 years, 9 months ago by johnnovakphotography.
Jacob,
Here is a link to the full log file: https://oxfordcreativeconnections.ca/wp-content/uploads/2021/02/wppa_error_log.txt
john
Jacob,
Here is another tidbit:
I am displaying Gallery Id 140 in a post using a shortcode [wppa type=”content” album=”140″] and the gallery display works.
So I tried one of the galleries I had problems with that way on the post. So I added Bruce Hartley’s gallery as [wppa type=”content” album=”100″] to the post and it worked.
Then I added a shortcode to Bruce’s gallery using the owner name as [wppa type=”content” album=”#owner,Bruce Hartley”]
The post now has all three shortcodes. The shortcodes that used album=”140″ and album=”100″ both worked and the one with album=”#owner, Bruce Hartley” did not even though Bruce’s gallery is gallery id 100.
Here is a link to the post: https://oxfordcreativeconnections.ca/2021/01/04/planet-earth-juried-art-show/
john
- This reply was modified 3 years, 9 months ago by johnnovakphotography.
Jacob,
I added a [wppa type=”content” album=”#owner,Planet Earth”] to the post below the [wppa type=”content” album=”140″] shortcode and the one for #owner did not show anything.
john
Pls be careful:
album="owner, Bruce Hartley"
will not work, it should bealbum="#owner,Bruce Hartley"
( # and no leading space on Bruce ).Is it a problem to use album ids in the shortcode rather than login names?
At least for the time being (the faulty albums), i will get into this to the bottom…Pls give me the current content of option wppa_child_list
The missing # was a typo in my message – edited it a few minutes ago. The # is in the actual code.
I could try using the album ids in the shortcode but I don’t know how to get it. I was using login names as I could get that both from the Ultimate Member directory list for non-logged in users and from the Ultimate Member profile for logged in users.
Here is the content of wppa_child_list:
a:67:{i:-1;s:145:”-1.40.46.56.61.63..65.68.70.72.74.76.78.80.82.85..87.100..103.108..110.112..119.121.124.127..129.131..133.135.143..145.147..150.152..153.155..160″;i:0;s:12:”136..142.154″;i:40;s:2:”40″;i:46;s:2:”46″;i:56;s:2:”56″;i:61;s:2:”61″;i:63;s:6:”63..64″;i:64;s:2:”64″;i:65;s:2:”65″;i:68;s:2:”68″;i:70;s:2:”70″;i:72;s:2:”72″;i:74;s:2:”74″;i:76;s:2:”76″;i:78;s:2:”78″;i:80;s:2:”80″;i:82;s:2:”82″;i:85;s:2:”85″;i:86;s:2:”86″;i:87;s:2:”87″;i:100;s:3:”100″;i:101;s:3:”101″;i:102;s:3:”102″;i:103;s:3:”103″;i:108;s:3:”108″;i:109;s:3:”109″;i:110;s:3:”110″;i:112;s:3:”112″;i:113;s:3:”113″;i:114;s:3:”114″;i:115;s:3:”115″;i:116;s:3:”116″;i:117;s:3:”117″;i:118;s:3:”118″;i:119;s:3:”119″;i:121;s:3:”121″;i:124;s:3:”124″;i:127;s:3:”127″;i:128;s:3:”128″;i:129;s:3:”129″;i:131;s:3:”131″;i:132;s:3:”132″;i:133;s:3:”133″;i:135;s:3:”135″;i:136;s:8:”136..142″;i:137;s:3:”137″;i:138;s:3:”138″;i:139;s:3:”139″;i:140;s:3:”140″;i:141;s:3:”141″;i:142;s:3:”142″;i:143;s:3:”143″;i:144;s:3:”144″;i:145;s:3:”145″;i:147;s:3:”147″;i:148;s:3:”148″;i:149;s:3:”149″;i:150;s:3:”150″;i:152;s:3:”152″;i:153;s:3:”153″;i:154;s:3:”154″;i:155;s:3:”155″;i:156;s:3:”156″;i:157;s:3:”157″;i:158;s:3:”158″;i:159;s:3:”159″;i:160;s:3:”160″;}
john
Jacob,
Would the following PHP code work to get the album id?
$owner = ‘Bruce Hartley’;
$query = sprintf(“SELECT id FROM wp0e_wppa_albums WHERE owner =’%s'”, mysql_real_escape_string($owner));
$result = mysql_query($query);
if (!$result) {
$message = ‘Invalid query: ‘ . mysql_error() . “\n”;
$message .= ‘Whole query: ‘ . $query;
echo $$message;
} else {
while ($row = mysql_fetch_assoc($result)) {
$album_id = $row[‘id’];
$cmd = ‘[wppa type=”content” album=”‘;
$cmd = $cmd . $album_id;
$cmd = $cmd . ‘”]’;
echo do_shortcode($cmd);
}
}mysql_free_result($result);
Jacob,
I have a workaround in place.
I found the $albumname album specification in your documentation. Since all our members login name and Gallery/Album name are the same I have changed
[wppa type=”content” album=”#owner,username”]
to
[wppa type=”content” album=”$username”]
This has made all of the galleries visible on their profile pages.
Yes, of course. stupid me that i did not give you this hint…
Nevertheless it should work, and i found the cause.
Whenever an album is created, the child_list must be invalidated for the parent of that album, and there are more locations in the code where albums are created, like the grant an album mechanism.
When doing ‘#owner,loginname’ and no parent is supplied (you can do ‘#owner,loginname,parentalbumid’) either (grand)parent 0 or -1 is assumed (normal or separate), and when the album is not in either the 0 or -1 chain, it will not be found.
$albumname does not check for (grand)parent.It turns out that i ‘forgot’ to do it there also.
Now i placed the code in the low level creatre album routine so it will be done always.I will inform you what to do when a working version is available.
Glad you can continue your work.
Downloaded it and installed on a development copy of my site and no change.
All of the albums with a zero in their gallery/album id do not show the gallery contents on the users Ultimate Member profile page and also do appear in the “Upload to gallery” dropdown list on the “Upload Photo’s” when logged in to the front-end as an administrator.Here is the contents of the log file:
url: /user/bruce+hartley/
wppa-items.php:822 wppa_cache_album() <- wppa-functions.php:659 wppa_get_album_item() <- wppa-filter.php:535 wppa_albums() <- shortcodes.php:343 wppa_shortcodes() <- do_shortcode_tag() <- shortcodes.php:218 preg_replace_callback() <- shortcode-handler.php(65) : eval()’d code:7 do_shortcode() <- shortcode-handler.php:65 eval() <- shortcodes.php:343 xyz_ips_display_content()
Dbg: on:10.02.2021 10:06:39: OCC-admin-42: Album 19 does not exist (cache album)
url: /user/bruce+hartley/
wppa-items.php:822 wppa_cache_album() <- wppa-functions.php:659 wppa_get_album_item() <- wppa-filter.php:535 wppa_albums() <- shortcodes.php:343 wppa_shortcodes() <- do_shortcode_tag() <- shortcodes.php:218 preg_replace_callback() <- shortcode-handler.php(65) : eval()’d code:7 do_shortcode() <- shortcode-handler.php:65 eval() <- shortcodes.php:343 xyz_ips_display_content()
Dbg: on:10.02.2021 10:06:39: OCC-admin-42: Album 18 does not exist (cache album)
url: /user/bruce+hartley/
wppa-items.php:822 wppa_cache_album() <- wppa-functions.php:659 wppa_get_album_item() <- wppa-filter.php:535 wppa_albums() <- shortcodes.php:343 wppa_shortcodes() <- do_shortcode_tag() <- shortcodes.php:218 preg_replace_callback() <- shortcode-handler.php(65) : eval()’d code:7 do_shortcode() <- shortcode-handler.php:65 eval() <- shortcodes.php:343 xyz_ips_display_content()
Dbg: on:10.02.2021 10:06:39: OCC-admin-42: Album 16 does not exist (cache album)
url: /user/bruce+hartley/
wppa-items.php:822 wppa_cache_album() <- wppa-functions.php:659 wppa_get_album_item() <- wppa-filter.php:535 wppa_albums() <- shortcodes.php:343 wppa_shortcodes() <- do_shortcode_tag() <- shortcodes.php:218 preg_replace_callback() <- shortcode-handler.php(65) : eval()’d code:7 do_shortcode() <- shortcode-handler.php:65 eval() <- shortcodes.php:343 xyz_ips_display_content()
Dbg: on:10.02.2021 10:06:39: OCC-admin-42: Album 15 does not exist (cache album)
url: /user/bruce+hartley/
wppa-items.php:822 wppa_cache_album() <- wppa-functions.php:659 wppa_get_album_item() <- wppa-filter.php:535 wppa_albums() <- shortcodes.php:343 wppa_shortcodes() <- do_shortcode_tag() <- shortcodes.php:218 preg_replace_callback() <- shortcode-handler.php(65) : eval()’d code:7 do_shortcode() <- shortcode-handler.php:65 eval() <- shortcodes.php:343 xyz_ips_display_content()
Dbg: on:10.02.2021 10:06:39: OCC-admin-42: Album 14 does not exist (cache album)
url: /user/bruce+hartley/
wppa-items.php:822 wppa_cache_album() <- wppa-functions.php:659 wppa_get_album_item() <- wppa-filter.php:535 wppa_albums() <- shortcodes.php:343 wppa_shortcodes() <- do_shortcode_tag() <- shortcodes.php:218 preg_replace_callback() <- shortcode-handler.php(65) : eval()’d code:7 do_shortcode() <- shortcode-handler.php:65 eval() <- shortcodes.php:343 xyz_ips_display_content()
Dbg: on:10.02.2021 10:06:39: OCC-admin-42: Album 13 does not exist (cache album)
url: /user/bruce+hartley/
wppa-items.php:822 wppa_cache_album() <- wppa-functions.php:659 wppa_get_album_item() <- wppa-filter.php:535 wppa_albums() <- shortcodes.php:343 wppa_shortcodes() <- do_shortcode_tag() <- shortcodes.php:218 preg_replace_callback() <- shortcode-handler.php(65) : eval()’d code:7 do_shortcode() <- shortcode-handler.php:65 eval() <- shortcodes.php:343 xyz_ips_display_content()
Dbg: on:10.02.2021 10:06:39: OCC-admin-42: Album 12 does not exist (cache album)
url: /user/bruce+hartley/
wppa-items.php:822 wppa_cache_album() <- wppa-functions.php:659 wppa_get_album_item() <- wppa-filter.php:535 wppa_albums() <- shortcodes.php:343 wppa_shortcodes() <- do_shortcode_tag() <- shortcodes.php:218 preg_replace_callback() <- shortcode-handler.php(65) : eval()’d code:7 do_shortcode() <- shortcode-handler.php:65 eval() <- shortcodes.php:343 xyz_ips_display_content()
Dbg: on:10.02.2021 10:06:39: OCC-admin-42: Album 11 does not exist (cache album)
url: /user/bruce+hartley/
wppa-items.php:822 wppa_cache_album() <- wppa-functions.php:659 wppa_get_album_item() <- wppa-filter.php:535 wppa_albums() <- shortcodes.php:343 wppa_shortcodes() <- do_shortcode_tag() <- shortcodes.php:218 preg_replace_callback() <- shortcode-handler.php(65) : eval()’d code:7 do_shortcode() <- shortcode-handler.php:65 eval() <- shortcodes.php:343 xyz_ips_display_content()
Dbg: on:10.02.2021 10:06:39: OCC-admin-42: Album 8 does not exist (cache album)
url: /user/bruce+hartley/
wppa-items.php:822 wppa_cache_album() <- wppa-functions.php:659 wppa_get_album_item() <- wppa-filter.php:535 wppa_albums() <- shortcodes.php:343 wppa_shortcodes() <- do_shortcode_tag() <- shortcodes.php:218 preg_replace_callback() <- shortcode-handler.php(65) : eval()’d code:7 do_shortcode() <- shortcode-handler.php:65 eval() <- shortcodes.php:343 xyz_ips_display_content()
Dbg: on:10.02.2021 10:06:39: OCC-admin-42: Album 7 does not exist (cache album)
url: /user/bruce+hartley/
wppa-items.php:822 wppa_cache_album() <- wppa-functions.php:659 wppa_get_album_item() <- wppa-filter.php:535 wppa_albums() <- shortcodes.php:343 wppa_shortcodes() <- do_shortcode_tag() <- shortcodes.php:218 preg_replace_callback() <- shortcode-handler.php(65) : eval()’d code:7 do_shortcode() <- shortcode-handler.php:65 eval() <- shortcodes.php:343 xyz_ips_display_content()
Dbg: on:10.02.2021 10:06:39: OCC-admin-42: Album 4 does not exist (cache album)
url: /user/bruce+hartley/
wppa-items.php:822 wppa_cache_album() <- wppa-functions.php:659 wppa_get_album_item() <- wppa-filter.php:535 wppa_albums() <- shortcodes.php:343 wppa_shortcodes() <- do_shortcode_tag() <- shortcodes.php:218 preg_replace_callback() <- shortcode-handler.php(65) : eval()’d code:7 do_shortcode() <- shortcode-handler.php:65 eval() <- shortcodes.php:343 xyz_ips_display_content()
Dbg: on:10.02.2021 10:06:39: OCC-admin-42: Album 1 does not exist (cache album)
Obs: on:10.02.2021 10:03:44: OCC-admin-42: DB UPDATED
- The topic ‘Upload Photo Widget not showing for some users’ is closed to new replies.