Error in Google sitemap
When running it says
This page contains the following errors:
error on line 1 at column 14: Extra content at the end of the document
Below is a rendering of the page up to the first error.
How do I resolve this please?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
This page contains the following errors:
error on line 1 at column 14: Extra content at the end of the document
Below is a rendering of the page up to the first error.
Notice
2018-08-05 17:12:48 - PHP Notice: getimagesize(): Read error! in /home/******/public_html/catalog/model/tool/image.php on line 14
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
straightlight wrote: ↑Mon Aug 06, 2018 1:18 amSee this post: viewtopic.php?t=149445 . The issue you are encountering has nothing to do with google sitemap. However, the provided solution prior is also a patch for the XML output aside from your enquiry in this case.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
If you'd like to get in touch I think we have a similar script somewhere, or post on the Commercial Support forum.leeburgess wrote: ↑Mon Aug 06, 2018 3:15 amhow can I find the missing image as have over 5000 products
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
find:
Code: Select all
if ($this->mime == 'image/gif') {
$this->image = imagecreatefromgif($file);
} elseif ($this->mime == 'image/png') {
$this->image = imagecreatefrompng($file);
} elseif ($this->mime == 'image/jpeg') {
$this->image = imagecreatefromjpeg($file);
}
Code: Select all
$ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
if ($ext === 'jpg') {
$ext = 'jpeg';
}
$gd_function = 'imagecreatefrom' . $ext;
if (function_exists($gd_function) && @$gd_function($file) === FALSE) {
$log = new Log('error.log');
$log->write('Error: Bad image file: ' . $file . ' ' . $gd_function . '!');
}
Source: https://stackoverflow.com/questions/993 ... -or-broken
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
find:
Code: Select all
$image_new = str_replace(' ', '%20', $image_new); // fix bug when attach image on email (gmail.com). it is automatic changing space " " to +
Code: Select all
if ($this->getBadGDImage(DIR_IMAGE, $image_new)) {
$this->log->write('Error: Bad image file: ' . htmlspecialchars_decode(DIR_IMAGE . $image_new));
}
replace:
Code: Select all
}
}
Code: Select all
protected function getBadGDImage($path, $image) {
$results = array();
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path));
$allFiles = array_filter(iterator_to_array($iterator), function($file) {
return $file->isFile();
});
foreach ($allFiles as $key => $files) {
$key = str_replace('\\', '/', $key);
$path_exploded = explode('/', trim($key));
if (strstr($path_exploded[sizeof($path_exploded)- 1], '.')) {
$mime_type = mime_content_type($key);
$file = $path_exploded[sizeof($path_exploded) - 1];
$path_defined = sizeof($path_exploded) - 1;
$path_slice = array_slice($path_exploded, 0, $path_defined);
$location = implode('/', $path_slice);
if ($location == $path && $file == $image) {
switch ($mime_type) {
case "image/jpg":
case "image/jpeg":
$im = imagecreatefromjpeg($location . '/' . $file);
break;
case "image/png":
$im = imagecreatefrompng($location . '/' . $file);
break;
case "image/gif":
$im = imagecreatefromgif($location . '/' . $file);
break;
}
if (!$im) {
$results[] = array('location' => $location,
'file' => $file,
);
}
}
}
}
return (array)$results;
}
}
find:
Code: Select all
if ($this->request->server['HTTPS']) {
This should also output the bad images to the OC logs.
Same source (and re-worked).
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
No details provided. Forum rules.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I have no corrupt images now but Google sitemap says
This page contains the following errors:
error on line 1 at column 14: Extra content at the end of the document
Below is a rendering of the page up to the first error.
Users browsing this forum: No registered users and 319 guests