Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

FrontPage Image is not changing

6 years 4 months ago
  • Katrine's Avatar
    Topic Author
  • Katrine
  • Offline
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Licenses:
JomSocial Active

Good day,

I am trying to change the default front page image on JomSocial and it is not changing. Please assist.

6 years 4 months ago
Licenses:

HI, Katrine.

Thank you for contacting us.
How are you trying to change it? In Theme designer? Or by override?
Please, make sure that you disabled Joomla! cache and try again.
If that won't work, please:

1. Edit your first post.
2. Click switch below main text field: prntscr.com/fk3hdg
3. Provide your site details: backend URL, admin credentials and FTP: prntscr.com/fk3hwz
4. Let us know that you provided credentials by posting in the same thread.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
6 years 4 months ago
  • Katrine's Avatar
    Topic Author
  • Katrine
  • Offline
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Licenses:
JomSocial Active

Hi,

Thank you for responding. My apologies for the vague question.
Joomla caching is disabled. I was trying to change the image through Theme Designer. After selecting the file and saving, the image is shown in the preview as being uploaded successfully. However, on the frontend of the website, the default image still shows.

After some investigations I realized the following:

The default front page image source is taken from
components/com_community/assets/frontpage-image-default.jpg

The image preview shown in Theme Designer has the following link:
components/com_community/assets/frontpage-image.jpeg

The template file (/com_community/templates/flat102/layouts/frontpage/guest.php) that I am using has the following syntax for showing the frontpage image:
<div class="joms-landing__image" style="background:url(<?php echo $heroImage; ?>) no-repeat center center;"></div>

After some digging to find out where the variable $heroImage was set, I found the following logic located in the file located at /components/com_community/views/frontpage/view.html.php:
//hero image
$heroImage = JURI::root() . 'components/com_community/assets/frontpage-image-default.jpg';
if (file_exists(COMMUNITY_PATH_ASSETS . 'frontpage-image.jpg')) {
$heroImage = JURI::root() . 'components/com_community/assets/frontpage-image.jpg';
} else if (file_exists(COMMUNITY_PATH_ASSETS . 'frontpage-image.png')) {
$heroImage = JURI::root() . 'components/com_community/assets/frontpage-image.png';
}
From this piece of code, I decided to recreate the image with a .jpg extension. I reuploaded the .jpg photo through Theme Designer. The image preview link shown in Theme Designer now has the following path:
/components/com_community/assets/frontpage-image.jpg

Turning to the frontpage view now, lo and behold, the frontpage image was changed!

So therefore, it appears that:
If the uploaded file has a .jpeg extension, then the frontpage image would not change. If it has a .jpg extension then the front page image would change.

This would be a bug, yes?

Thanks again.

6 years 4 months ago
Licenses:

HI, Katerine.

Thank you for additional explanation. You should mention that you use Flat Theme at the first place :)
Theme Designer do not work with additional themes - only with default one.

IN your case you'll need to override image files like described here: documentation.jomsocial.com/wiki/Replacing_Default_Avatar


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
The following user(s) said Thank You: Katrine
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW