Forum

Thread tagged as: Problem, Members

Member image not showing in admin

I've created some additional fields in members.html, one of which is an image field

<perch:members type="image" id="charity_logo" label="Charity Logo" width="150" height="150" crop="false" order="2" bucket="Logos" />

Everything is working as expected, except the image does not show up in the admin area. It uploads fine and can be viewed in the asset panel and I can retrieve it on the front end...

$image = perch_member_get('charity_logo'); ?>
<img src="/perch/resources/Logos/<?php echo $image['sizes']['w150h150c0']['path'];  ?>" alt="<?php echo perch_member_get('alt'); ?>" />

Ant idea why it does not show in the admin area?

Thanks

Diagnostics


Perch: 2.8.26, PHP: 7.0.0, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 7e72f9690b1498a1bead7a637c33a831c0d2f655 $, with PDO Server OS: Darwin, apache2handler Installed apps: content (2.8.26), assets (2.8.26), categories (2.8.26), perch_blog (5.0), perch_forms (1.8.3), perch_mailchimp (2.0.1), perch_members (1.4.2), perch_twitter (3.5.1) App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', 'perch_members', 'perch_blog', 'perch_twitter', 'perch_mailchimp' ); PERCH_LOGINPATH: /perch PERCH_PATH: .../httpdocs/perch PERCH_CORE: .../httpdocs/perch/core PERCH_RESFILEPATH: .../httpdocs/perch/resources Image manipulation: GD PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M F1: 2edba60ed1f613d6dd804feb202456a2 Resource folder writeable: Yes HTTP_HOST: ghtrain:8888 DOCUMENT_ROOT: .../ghtraining/httpdocs REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Caleb Evans

Caleb Evans 1 points

  • 5 years ago

perch_member_get() returns the value of a logged in "member". Therefore, only if you are logged in as a "member" in addition to being logged in as a perch admin/editor would this value show in the admin panel.

I may have misunderstood after having read your question again...

But I also notice you mention members.html as the template, this should be member.html, was this just an error in typing?

RK

Drew McLellan

Drew McLellan 2638 points
Perch Support

What do you see?

@Drew - It just shows `Select or upload an image' as you would get when none has been added yet. No errors in debug or any other obvious problem.

@Robert - yes, just a typo. Front end is fine, Should I be able to see all data in the back end?

Thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, I don't think I have a solution for that. I'll take a look and see if we can reproduce it.

OK. Thanks Drew