Support

Support is part of Event Gallery Extended.

Please get a subscription if you need support. Feel free to use the ticket system or the contact form for reporting defects or pre-sale questions. Make sure you're logged in in order to be able to create a new ticket.

For general information you can also jump to the manual.

Subscribe now!

#2170 Failed to load resource: the server responded with a status of 404 (Not Found)

Posted in ‘Event Gallery - General’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by sbluege on Friday, 03 June 2016 07:35 UTC

Diyor@
 Hi, Sven! Your gallery component looked great untill i changed my port from the 80 port to 443 port. pix which were in my gallery became hidden. Can you do me a favour and solve my problem? Here i gave screenshots from my site. Thanks

Attachments

gallery_page2.jpg
gallery_page1.jpg

sbluege
You server returns a 404 for the thumbnail urls. You need to find out why:

https://www.mf.uz/components/com_eventgallery/helpers/image.php?option=com_eventgallery&mode=crop&width=512&view=resizeimage&folder=Respublika_Karakalpakstan&file=3d+HD+Wallpapers+1080p2.jpg

Please check if the image.php file exists and if it executable.

Diyor@
Thanks for the quick response,

Yes the file index.php is working. i compared two index.php files from the test version of my site in which your gallery works great, and the second index.php file from my current site...

Diyor@
Also i tried to to add in my gallery other pix...they arent shown too

sbluege
Well..... image.php, not index.php. You checked the wrong file.

This one you need to check: /com_eventgallery/helpers/image.php

Diyor@
<?php
/**
* @package Sven.Bluege
* @subpackage com_eventgallery
*
* @copyright Copyright (C) 2005 - 2013 Sven Bluege All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
define('_JEXEC', 1);

// useless, just to satisfy the jedChecker
defined('_JEXEC') or die;


if (!defined('_JDEFINES')) {
// remove the first 3 folders because
// we're in a subfolder and have not
// native Joomla help. Doing this will
// enable this comonent to run in a subdirectory
// like http://foo.bar/foobar
$basefolders = explode(DIRECTORY_SEPARATOR, dirname(__FILE__));
$basefolders = array_splice($basefolders, 0, count($basefolders) - 3);
define('JPATH_BASE', implode(DIRECTORY_SEPARATOR, $basefolders));
require_once JPATH_BASE . '/includes/defines.php';
}

require_once JPATH_BASE . '/includes/framework.php';
require_once JPATH_BASE . '/components/com_eventgallery/config.php';


$file = JRequest::getString('file');
$folder = JRequest::getString('folder');
$width = JRequest::getInt('width', -1);
$mode = JRequest::getString('mode', 'nocrop');


$file = STR_REPLACE("\.\.", "", $file);
$folder = STR_REPLACE("\.\.", "", $folder);
$width = STR_REPLACE("\.\.", "", $width);
$mode = STR_REPLACE("\.\.", "", $mode);

$file = STR_REPLACE("/", "", $file);
$folder = STR_REPLACE("/", "", $folder);
$width = STR_REPLACE("/", "", $width);
$mode = STR_REPLACE("/", "", $mode);


$file = STR_REPLACE("\\", "", $file);
$folder = STR_REPLACE("\\", "", $folder);
$width = STR_REPLACE("\\", "", $width);
$mode = STR_REPLACE("\\", "", $mode);


//full means max size.
if (strcmp('full', $mode) == 0) {
$mode = 'nocrop';
$width = 5000;
}

require_once JPATH_BASE . '/components/com_eventgallery/helpers/sizeset.php';

$sizeSet = new EventgalleryHelpersSizeset();
$saveAsSize = $sizeSet->getMatchingSize($width);


$basedir = COM_EVENTGALLERY_IMAGE_FOLDER_PATH;
$sourcedir = $basedir . $folder;
$cachebasedir = JPATH_CACHE . DIRECTORY_SEPARATOR . 'com_eventgallery_images' . DIRECTORY_SEPARATOR;
$cachedir = $cachebasedir . $folder;
$cachedir_thumbs = $cachebasedir . $folder;

$image_file = $sourcedir . DIRECTORY_SEPARATOR . $file;
$image_thumb_file = $cachedir_thumbs . DIRECTORY_SEPARATOR . $mode . $saveAsSize . $file;
//$last_modified = gmdate('D, d M Y H:i:s T', filemtime ($image_file));
$last_modified = gmdate('D, d M Y H:i:s T', mktime(0, 0, 0, 1, 1, 1998));


$debug = false;
if ($debug || !file_exists($image_thumb_file)) {

// Mark afterLoad in the profiler.
JDEBUG ? $_PROFILER->mark('afterLoad') : NULL;

// Instantiate the application.
$app = JFactory::getApplication('site');

// Initialise the application.
$app->initialise();

// Mark afterIntialise in the profiler.
JDEBUG ? $_PROFILER->mark('afterInitialise') : NULL;

// Route the application.
//$app->route();

// Mark afterRoute in the profiler.
JDEBUG ? $_PROFILER->mark('afterRoute') : NULL;

// Dispatch the application.
$app->dispatch();

// Mark afterDispatch in the profiler.
JDEBUG ? $_PROFILER->mark('afterDispatch') : NULL;

// Render the application.
$app->render();

// Mark afterRender in the profiler.
JDEBUG ? $_PROFILER->mark('afterRender') : NULL;

// Return the response.
/** @noinspection PhpToStringImplementationInspection */
echo $app;
}

$mime = ($mime = getimagesize($image_thumb_file)) ? $mime['mime'] : $mime;
$size = filesize($image_thumb_file);
$fp = fopen($image_thumb_file, "rb");
if (!($mime && $size && $fp)) {
// Error.
return;
}

if (!$debug) {
header("Content-Type: " . $mime);
header("Content-Length: " . $size);
header("Last-Modified: $last_modified");
}

fpassthru($fp);
die();



Are there any errors?

sbluege
At least this answers my question if this file exists. Can the webserver execute it?

sbluege
You can try to ask your hosting provide too if you're not sure how to check this.

In the meantime you can enable the Use Rendering Fallback in the components options. Please note that this needs more server resources and is not recommended as a long term solution.