Images not showing (XAMPP + Windows)
Responsive WordPress theme for musicians, bands, artists - easy to configure and various theme features.
- GK User
- Wed Jun 26, 2013 2:11 pm
I am working on our new website with the Rockwall template.
Server is Windows with XAMPP.
The images are not showing (placeholders - demo jpg)
I followed the thread in https://github.com/GavickPro/Meet-GavernWP/issues/207 but I still get:
$image_path: http://10.0.0.100/wp/wp-content/uploads ... img_editor: C:\xampp\htdocs\wp/wp-content/uploads\http://10.0.0.100/wp/wp-content/uploads/2013/05/a2.jpgAn error occured during creating the thumbnail.
Server is Windows with XAMPP.
The images are not showing (placeholders - demo jpg)
I followed the thread in https://github.com/GavickPro/Meet-GavernWP/issues/207 but I still get:
$image_path: http://10.0.0.100/wp/wp-content/uploads ... img_editor: C:\xampp\htdocs\wp/wp-content/uploads\http://10.0.0.100/wp/wp-content/uploads/2013/05/a2.jpgAn error occured during creating the thumbnail.
-
- Junior Boarder
- GK User
- Thu Jun 27, 2013 7:54 am
Hi,
Could you attach a screenshot? Maybe you changed generate_art_image function only in GK NewsShowPro, try to do the same with this function in gavern/widgets.titleoverlay.php file.
Let me know if it works, then I'll add this fix to the nearest theme update.
Could you attach a screenshot? Maybe you changed generate_art_image function only in GK NewsShowPro, try to do the same with this function in gavern/widgets.titleoverlay.php file.
Let me know if it works, then I'll add this fix to the nearest theme update.
-
- Moderator
- GK User
- Thu Jun 27, 2013 2:28 pm
I changed the function generate_art_image($i, $art_ID) in the widgets.titleoverlay mainly changing the lines like:
$img_filename = $img_editor->generate_filename( $this->id, dirname(__FILE__) . DIRECTORY_SEPARATOR . 'cache_nsp');
to
$img_filename = $img_editor->generate_filename( $this->id, dirname(__FILE__) . '/' . 'cache_nsp');
and the line:
$new_path = get_template_directory_uri() . $new_path;
to
Here is the screenshot that I get

$img_filename = $img_editor->generate_filename( $this->id, dirname(__FILE__) . DIRECTORY_SEPARATOR . 'cache_nsp');
to
$img_filename = $img_editor->generate_filename( $this->id, dirname(__FILE__) . '/' . 'cache_nsp');
and the line:
$new_path = get_template_directory_uri() . $new_path;
to
Here is the screenshot that I get

-
- Junior Boarder
- GK User
- Fri Jun 28, 2013 7:08 am
Ok, I think that should be ok, but you have to resave widget options (Save again widgets on positions with this problem, because of images caching).
-
- Moderator
- GK User
- Fri Jun 28, 2013 2:02 pm
I did save the widgets (even changing the title of the mainbody widget) and it still doesn't show the demo images:


-
- Junior Boarder
- GK User
- Fri Jun 28, 2013 2:19 pm
There is a difference in the function between the two php files. In the title overlay php, there is a art_ID variable that comes from code before:
if(isset($this->wdgt_results[0]) || (is_array($this->wdgt_results[0]) && isset($this->wdgt_results[0][0]))) {
// get important article fields
$art_ID = '';
$art_title = '';
$art_url = '';
// from the retrieved results
if($this->wdgt_config['data_source_type'] == 'post' || $this->wdgt_config['data_source_type'] == 'custom') {
$art_ID = $this->wdgt_results[0][0]->ID;
$art_title = $this->wdgt_results[0][0]->post_title;
} else {
$art_ID = $this->wdgt_results[0]->ID;
$art_title = $this->wdgt_results[0]->post_title;
}
// get the article image
$art_image = $this->generate_art_image($r, $art_ID);
// if there is image
if($art_image !== FALSE) {
// URL
$art_url = get_permalink($art_ID);
// output
echo '<img src="'.$art_image.'" alt="'.strip_tags(htmlspecialchars($art_title)).'" />';
echo '<figcaption style="padding: '.$this->wdgt_config['title_padding'].'; width: '.$this->wdgt_config['title_width'].'%;">';
echo '<h3><a href="'.$art_url.'" title="'.strip_tags(htmlspecialchars($art_title)).'">'.$art_title.'</a></h3>';
echo '</figcaption>';
}
}
// closing image wrapper
Maybe it has something to do with that?
if(isset($this->wdgt_results[0]) || (is_array($this->wdgt_results[0]) && isset($this->wdgt_results[0][0]))) {
// get important article fields
$art_ID = '';
$art_title = '';
$art_url = '';
// from the retrieved results
if($this->wdgt_config['data_source_type'] == 'post' || $this->wdgt_config['data_source_type'] == 'custom') {
$art_ID = $this->wdgt_results[0][0]->ID;
$art_title = $this->wdgt_results[0][0]->post_title;
} else {
$art_ID = $this->wdgt_results[0]->ID;
$art_title = $this->wdgt_results[0]->post_title;
}
// get the article image
$art_image = $this->generate_art_image($r, $art_ID);
// if there is image
if($art_image !== FALSE) {
// URL
$art_url = get_permalink($art_ID);
// output
echo '<img src="'.$art_image.'" alt="'.strip_tags(htmlspecialchars($art_title)).'" />';
echo '<figcaption style="padding: '.$this->wdgt_config['title_padding'].'; width: '.$this->wdgt_config['title_width'].'%;">';
echo '<h3><a href="'.$art_url.'" title="'.strip_tags(htmlspecialchars($art_title)).'">'.$art_title.'</a></h3>';
echo '</figcaption>';
}
}
// closing image wrapper
Maybe it has something to do with that?
-
- Junior Boarder
- GK User
- Fri Jun 28, 2013 2:32 pm
Ok it was fixed.
Went from:
// $new_path_pos = stripos($new_path, '/gavern/cache_nsp/');
// $new_path = substr($new_path, $new_path_pos);
// $new_path = get_stylesheet_directory_uri() . $new_path;
to
$cache_uri = get_stylesheet_directory_uri() . '/gavern/cache_nsp/';
$new_path = $cache_uri . $new_path;
Went from:
// $new_path_pos = stripos($new_path, '/gavern/cache_nsp/');
// $new_path = substr($new_path, $new_path_pos);
// $new_path = get_stylesheet_directory_uri() . $new_path;
to
$cache_uri = get_stylesheet_directory_uri() . '/gavern/cache_nsp/';
$new_path = $cache_uri . $new_path;
-
- Junior Boarder
- GK User
- Fri Jun 28, 2013 7:31 pm
Thanks for your reports, I'll test it on Windows and Mac and add fix to the nearest theme update.
-
- Moderator
8 posts
• Page 1 of 1