Post by hardy5215 » Fri Aug 25, 2017 9:39 pm

Hey Everyone.

Opencart 2.0.3.0
I am getting an error when trying any of the links below

gameskeysaustralia.com/sitemap.xml
https://gameskeysaustralia.com/index.ph ... le_sitemap

Error is

Warning: mysqli::query(): (21000/1242): Subquery returns more than 1 row in /home/gameskey/public_html/system/library/db/mysqli.php on line 18

Any one know how I will be able to fix this?

TIA

Newbie

Posts

Joined
Mon Dec 29, 2014 6:17 pm

Post by rjcalifornia » Mon Aug 28, 2017 2:05 am

Is that a third party mod? If so, you need to either ask the developer or use another mod

Image


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by webcorvo » Mon Aug 28, 2017 6:53 pm

The problem is the module google site map

Opencart Developer - For custom work and support contact @ webcorvo@gmail.com


User avatar
Active Member

Posts

Joined
Mon Mar 20, 2017 11:42 pm
Location - Lisbon, Portugal

Post by rjcalifornia » Wed Aug 30, 2017 10:17 am

It might not be compatible with your OpenCart version (3.0)

Contact the developer of the mod

Image


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by dadams » Wed Sep 27, 2017 8:04 pm

Guys sorry I am new here and could not find an option to start a new subject. Wonder if someone can help me to remove google map on my home page at the bottom ("Contact Us") please.

Newbie

Posts

Joined
Wed Sep 27, 2017 7:56 pm

Post by straightlight » Thu Sep 28, 2017 7:12 pm

In your catalog/view/theme/your_theme/template/common/footer.twig file,

find:

Code: Select all

<li><a href="{{ sitemap }}">{{ text_sitemap }}</a></li>
either comment with:

Code: Select all

<!--<li><a href="{{ sitemap }}">{{ text_sitemap }}</a></li>-->
or remove the line.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Sun Aug 05, 2018 4:25 am

See this solution: https://github.com/opencart/opencart/pu ... e007255b4b . Then, apply these steps before noticing the results on the google sitemap page: viewtopic.php?f=176&p=731004#p718325

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by leeburgess » Sun Aug 05, 2018 6:01 pm

Sadly still the same.

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

New member

Posts

Joined
Sat Sep 16, 2017 3:19 am

Post by leeburgess » Sun Aug 05, 2018 6:02 pm

<?php
class ControllerExtensionFeedGoogleSitemap extends Controller {
public function index() {
if ($this->config->get('feed_google_sitemap_status')) {
$output = '<?xml version="1.0" encoding="UTF-8"?>';
$output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';

$this->load->model('catalog/product');
$this->load->model('tool/image');

$products = $this->model_catalog_product->getProducts();

foreach ($products as $product) {
if ($product['image']) {
$output .= '<url>';
$output .= ' <loc>' . htmlspecialchars($this->url->link('product/product', 'language=' . $this->config->get('config_language') . '&product_id=' . $product['product_id']), ENT_COMPAT | ENT_XML1) . '</loc>';
$output .= ' <changefreq>weekly</changefreq>';
$output .= ' <lastmod>' . date('Y-m-d\TH:i:sP', strtotime($product['date_modified'])) . '</lastmod>';
$output .= ' <priority>1.0</priority>';
$output .= ' <image:image>';
$output .= ' <image:loc>' . htmlspecialchars($this->model_tool_image->resize($product['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_popup_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_popup_height')), ENT_COMPAT | ENT_XML1) . '</image:loc>';
$output .= ' <image:caption>' . htmlspecialchars($product['name'], ENT_COMPAT | ENT_XML1) . '</image:caption>';
$output .= ' <image:title>' . htmlspecialchars($product['name'], ENT_COMPAT | ENT_XML1) . '</image:title>';
$output .= ' </image:image>';
$output .= '</url>';
}
}

$this->load->model('catalog/category');

$output .= $this->getCategories(0);

$this->load->model('catalog/manufacturer');

$manufacturers = $this->model_catalog_manufacturer->getManufacturers();

foreach ($manufacturers as $manufacturer) {
$output .= '<url>';
$output .= ' <loc>' . htmlspecialchars($this->url->link('product/manufacturer/info', 'language=' . $this->config->get('config_language') . '&manufacturer_id=' . $manufacturer['manufacturer_id']), ENT_COMPAT | ENT_XML1) . '</loc>';
$output .= ' <changefreq>weekly</changefreq>';
$output .= ' <priority>0.7</priority>';
$output .= '</url>';

$products = $this->model_catalog_product->getProducts(array('filter_manufacturer_id' => $manufacturer['manufacturer_id']));

foreach ($products as $product) {
$output .= '<url>';
$output .= ' <loc>' . htmlspecialchars($this->url->link('product/product', 'language=' . $this->config->get('config_language') . '&manufacturer_id=' . $manufacturer['manufacturer_id'] . '&product_id=' . $product['product_id']), ENT_COMPAT | ENT_XML1) . '</loc>';
$output .= ' <changefreq>weekly</changefreq>';
$output .= ' <priority>1.0</priority>';
$output .= '</url>';
}
}

$this->load->model('catalog/information');

$informations = $this->model_catalog_information->getInformations();

foreach ($informations as $information) {
$output .= '<url>';
$output .= ' <loc>' . htmlspecialchars($this->url->link('information/information', 'language=' . $this->config->get('config_language') . '&information_id=' . $information['information_id']), ENT_COMPAT | ENT_XML1) . '</loc>';
$output .= ' <changefreq>weekly</changefreq>';
$output .= ' <priority>0.5</priority>';
$output .= '</url>';
}

$output .= '</urlset>';

$this->response->addHeader('Content-Type: application/xml');
$this->response->setOutput($output);
}
}

protected function getCategories($parent_id, $current_path = '') {
$output = '';

$results = $this->model_catalog_category->getCategories($parent_id);

foreach ($results as $result) {
if (!$current_path) {
$new_path = $result['category_id'];
} else {
$new_path = $current_path . '_' . $result['category_id'];
}

$output .= '<url>';
$output .= ' <loc>' . htmlspecialchars($this->url->link('product/category', 'language=' . $this->config->get('config_language') . '&path=' . $new_path), ENT_COMPAT | ENT_XML1) . '</loc>';
$output .= ' <changefreq>weekly</changefreq>';
$output .= ' <priority>0.7</priority>';
$output .= '</url>';

$products = $this->model_catalog_product->getProducts(array('filter_category_id' => $result['category_id']));

foreach ($products as $product) {
$output .= '<url>';
$output .= ' <loc>' . htmlspecialchars($this->url->link('product/product', 'language=' . $this->config->get('config_language') . '&path=' . $new_path . '&product_id=' . $product['product_id']), ENT_COMPAT | ENT_XML1) . '</loc>';
$output .= ' <changefreq>weekly</changefreq>';
$output .= ' <priority>1.0</priority>';
$output .= '</url>';
}

$output .= $this->getCategories($result['category_id'], $new_path);
}

return $output;
}
}

New member

Posts

Joined
Sat Sep 16, 2017 3:19 am

Post by straightlight » Sun Aug 05, 2018 8:50 pm

Did you cleared the cache as mentioned on my previous post? If so, please provide the error / server access logs.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by leeburgess » Mon Aug 06, 2018 1:09 am

I did :) error 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.
Notice
straightlight wrote:
Sun Aug 05, 2018 8:50 pm
Did you cleared the cache as mentioned on my previous post? If so, please provide the error / server access logs.

New member

Posts

Joined
Sat Sep 16, 2017 3:19 am

Post by straightlight » Mon Aug 06, 2018 1:19 am

Solution provided here: viewtopic.php?f=202&t=206176#p731152 . There is no need to double-post the same issue on different topics which this strategy is not excluded from the forum rules.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 151 guests