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.

Photos covers for events dont save

9 years 4 months ago
Licenses:
JomSocial Active

When I load up a photo for an event cover. It looks like it has saved but if I navigate away form the page and return I just see the default photo I have saved.I'm pretty sure I see this as an issue also for user profile covers, group profile covers and so on.

www.ibikeride.com/events/viewevent/321-2...-of-children-in-need

NB always tells me on the activity feed that I have posted a new photo but (it hasn't)

9 years 4 months ago
Licenses:

Hi,

here the fix,
please edit: /components/com_community/helpers/url.php, arounf line 160 you can see this code

static public function coverURI($file = '', $default = '') {
    $config = CFactory::getConfig();

    $storage = CStorage::getStorage($config->get('photostorage'));

    /* Default cover */
    if (empty($file) || !$storage->exists($file)) {
        $template = new CTemplateHelper();
        $asset = $template->getTemplateAsset($default, 'images');
        $uri = $asset->url;
        return $uri;
    }
    if($config->get('photostorage') == 'file'){
        $file = str_ireplace($config->get('imagecdnpath'), '', $file);
        // CDN or local
        $baseUrl = $config->get('imagebaseurl') or
                $baseUrl = JURI::root();
        $uri = str_replace('\\', '/', rtrim($baseUrl, '/') . '/' . ltrim($file, '/'));
        return $uri;
    } else {
        return $storage->getURI($file);
    }
}
changing it to
static public function coverURI($file = '', $default = '') {
    $config = CFactory::getConfig();

    $storage = CStorage::getStorage($config->get('photostorage'));

    /* Default cover */
    if (empty($file)) {
        $template = new CTemplateHelper();
        $asset = $template->getTemplateAsset($default, 'images');
        $uri = $asset->url;
        return $uri;
    }
    if($config->get('photostorage') == 'file' || JFile::exists($file)){
        $file = str_ireplace($config->get('imagecdnpath'), '', $file);
        // CDN or local
        $baseUrl = $config->get('imagebaseurl') or
                $baseUrl = JURI::root();
        $uri = str_replace('\\', '/', rtrim($baseUrl, '/') . '/' . ltrim($file, '/'));
        return $uri;
    } else {
        return $storage->getURI($file);
    }
}

Regards,
Albert

9 years 4 months ago
Licenses:
JomSocial Active

Thanks that worked. Hoping this will be part of the code in the next release?

9 years 4 months ago
Licenses:

Hi,

not sure this fixes will be included or not. because, that fixes only for temporary. developer will review it again.
i will back to you again for officially fixes

Regards,
Albert

9 years 2 months ago
Licenses:
JomSocial Active

Ok but i had a cause to reinstall jomsocial and lost all these images post i implemeted the fix so be good in the continuity could be looked at somehow in the next release.

9 years 2 months ago
Licenses:

Hi,

at my prev post, that only temporary fix. our developer still dealing with this issue. I hope in next release will be included.

Regards

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