[#8088] Quick-start CB Profile School and Work logo images upload not working

3 years 9 months ago - 3 years 9 months ago #319484 by Sekulla
Hi
I am using the CB Quickstart package and without making any changes it seems that the Schools and Workplaces field for logo images within teh Field Group does not seem to work.

You can select a jpg file to upload and it seems to work but then it does not display in display view. The fontawesome default image disappears but no new image is shown. Cannot get it to work, tried everything. Tried several image types, made sure that image approval is turned off etc.

I then tried creating a similar field group with a image field on separate clean CB installation and the same thing. It will not display the uploaded image. If i merely reassign the image field outside of the field group, it works. So seems to be something to do with the field group setting in the quickstart setup.

I even tried the quickstart demo setup on the Joomlapolis website, and it too does not display any uploaded image.

Any ideas?

Many thanks in advance

Please Log in to join the conversation.

3 years 9 months ago #319495 by beat
Ok, Does the default image include a small watch "waiting for approval" also in your case ?

There seems to be a... bug :silly: for images approvals within the Field Groups.

If you turn off Image approval in the CB configuration / Moderation tab, or
If you turn off Image approval in the image field settings, in Parameters / Image limits / Approval setting,
then the image displays fine in the Field Group.

If not, then (bug), it doesn't appear in the regular image approvals view nor in the CB Workflow module.

I have added a bug tracker item #8087 for further bug investigation:
forge.joomlapolis.com/issues/8087

In the mean time, switch to No the Approval setting for that image field, and newly uploaded images should display (already uploaded ones will stay in the waiting for approval mode).

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

3 years 9 months ago #319497 by Sekulla
No in my case there is no image approval icon. Nor is there any notification in workflow module. The default fontawesome image disappears and no image is shown, just blank

If I try to upload a new image I get the option to "remove image" so an image has been uploaded but will not display. I have tried turning off all levels of image approval and this has no effect.

Image field works when removed from field group but not when assigned to field group.

Please Log in to join the conversation.

3 years 9 months ago #319507 by Sekulla
Further info...

Image moderation turned off in Config
Image field created for display on a Tab
Check that Image field works and is able to upload and display image.
Moved the same image field into an existing Field Group and the image no longer displays.
Seems to be related to the field group handling.

Please Log in to join the conversation.

3 years 9 months ago #319520 by beat
That's rather strange, as I can't reproduce your issue neither on our demo site nor in my localhost test.

The approval icon (or no icons) can vary depending on your template and CB template.

I could though reproduce one case where the images field group would not display: If the image field is on a different tab than the fieldgroup in which the image is inserted, and that tab doesn't display for various reasons (e.g. the default "account" tab) it doesn't display within the field group either.

Not sure if that is a wanted, so will open a feedback tracker item for that.

Was that your case too ?

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

3 years 9 months ago #319522 by Sekulla
Hi Beat,

Ok, I have made some progress in this investigation.

1) It is not a template issue as I have tried on both a warp-theme and a Helix 3 Ultimate template. Same behaviour

2) It is not a tabs assignment issue as I have been consistent on performing only on one tab.

The problem seems to be with the CB substitution "PROFILE_WORK_WORKPLACE_DISPLAY"

Specifically it is related to the "else" operator for determining whether to display the default fontawesome icon or the actual image.

The current original substitution snippet is;

[cb:if cb_work_workplace!=""]<div class="row no-gutters"><div class="col-3 text-center">[cb:if cb_work_logo=""]<span class="fa fa-building fa-4x"></span>[cb:else][cb:userfield field="cb_work_logo" /][/cb:else][/cb:if]</div>......

There seems to be a problem with the use of "else" instead of "elseif". SO Itried to remove this with the following:

[cb:if cb_work_workplace!=""]<div class="row no-gutters"><div class="col-3 text-center">[cb:userfield field="cb_work_logo" /]</div>......

This works and displays the image correctly but of course not the default icon when the image field is empty as expected. Proving the porblem is with the "else" operator.

So I tried to correct using "elseif" instead of "else" in order to reinstate the default icon feature using;

[cb:if cb_work_workplace!=""]<div class="row no-gutters"><div class="col-3 text-center">[cb:if cb_work_logo=""]<span class="fa fa-building fa-4x"></span>[cb:elseif cb:userfield field="cb_work_logo" /][/cb:elseif][/cb:if]</div>.....

Unfortunately, this did not work. So it seems there is an issue with the "elseif" operator

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.230 seconds

Facebook Twitter LinkedIn