JPSSAU Posted July 21, 2013 Share Posted July 21, 2013 (edited) Suite mise à jour : je configure le module, puis quand je clique sur "generer" rien. Pas de fichier generé Fatal error: Call to undefined method ShopBackwardModule::getBaseURL() in /home/pointlaser/domains/bluedomain.biz/public_html/modules/gsitemap/gsitemap.php on line 230 Edited July 21, 2013 by JPSSAU (see edit history) Link to comment Share on other sites More sharing options...
leste Posted August 4, 2013 Share Posted August 4, 2013 Même problème que toi, as tu trouvé une solution ?? Merci Link to comment Share on other sites More sharing options...
canel Posted October 4, 2013 Share Posted October 4, 2013 Bonjour, Idem pour moi, avez-vous trouvez une solution svp ? Link to comment Share on other sites More sharing options...
devein Posted January 19, 2014 Share Posted January 19, 2014 (edited) short: *remember to copy /override/classes/Shop.php to your prestashop path /override/classes/Shop.php* the gsitemap module with modifications needed: https://mega.co.nz/#!iBoTzIwY!FOUx_RgoVrbQyzwYCbYRL3RWFsIcCU5IhbfMV07onZE LONG: in prestashop 1.4, there are a couple of problems when you want to use latest modules from: https://github.com/PrestaShop/PrestaShop-modules 1) sometimes not all files get copied to their places when installing a new module (compare manually the git directory and the /modules/ directory - /modules/gsitemap/backwards-compatibility/* files dont get copied into respective /modules/gsitemap/(...) dirs (.zip loading from github is not parsing the link or smthn) 2) files which need to be placed in /override/classes/ are not copied there! (this is a direct answer for the problem in this topic) for example: https://github.com/PrestaShop/PrestaShop-modules/tree/master/gsitemap/override/classes file "Shop.php" this does not get copied into your servers' path: => /override/classes/Shop.php 3) sometimes the generated xml files are not seen properly by google webmaster tools or similar. possible problem: server and .htaccess files security. make sure that when you click on: you get generated .xml file there should be a couple of lines directing to other .xml's like that: <?xml version="1.0" encoding="UTF-8"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>http://www.bristen.pl/1_en_0_sitemap.xml</loc><lastmod>2014-01-19T14:51:23+01:00</lastmod></sitemap><sitemap><loc>http://www.bristen.pl/1_pl_0_sitemap.xml</loc><lastmod>2014-01-19T14:51:23+01:00</lastmod></sitemap></sitemapindex> also, in the current git version, in the /modules/gsitemap/gsitemap.php function getContent() should have moved the "if" fragment: /* Backward compatibility */ if (_PS_VERSION_ < 1.5) { require(_PS_MODULE_DIR_.'gsitemap/backward_compatibility/backward.php'); } to top of the function. so in the result the getContent() function should look like this: public function getContent() { /* Backward compatibility */ if (_PS_VERSION_ < 1.5) { require(_PS_MODULE_DIR_.'gsitemap/backward_compatibility/backward.php'); } /* Store the posted parameters and generate a new Google Sitemap files for the current Shop */ if (Tools::isSubmit('SubmitGsitemap')) { Configuration::updateValue('GSITEMAP_FREQUENCY', pSQL(Tools::getValue('gsitemap_frequency'))); Configuration::updateValue('GSITEMAP_INDEX_CHECK', ''); Configuration::updateValue('GSITEMAP_CHECK_IMAGE_FILE', pSQL(Tools::getValue('gsitemap_check_image_file'))); $meta = ''; if (Tools::getValue('gsitemap_meta')) $meta .= implode(', ', Tools::getValue('gsitemap_meta')); Configuration::updateValue('GSITEMAP_DISABLE_LINKS', $meta); $this->emptySitemap(); $this->createSitemap(); } /* if no posted form and the variable [continue] is found in the HTTP request variable keep creating sitemap */ elseif (Tools::getValue('continue')) $this->createSitemap(); /* Empty the Shop domain cache */ if (method_exists('ShopUrl', 'resetMainDomainCache')) ShopUrl::resetMainDomainCache(); $this->context->smarty->assign(array( 'gsitemap_form' => './index.php?tab=AdminModules&configure=gsitemap&token='.Tools::getAdminTokenLite('AdminModules').'&tab_module='.$this->tab.'&module_name=gsitemap', 'gsitemap_cron' => _PS_BASE_URL_._MODULE_DIR_.'gsitemap/gsitemap-cron.php?token='.substr(Tools::encrypt('gsitemap/cron'), 0, 10).'&id_shop='.$this->context->shop->id, 'gsitemap_feed_exists' => file_exists(dirname(__FILE__).'/../../index_sitemap.xml'), 'gsitemap_last_export' => Configuration::get('GSITEMAP_LAST_EXPORT'), 'gsitemap_frequency' => Configuration::get('GSITEMAP_FREQUENCY'), 'gsitemap_store_url' => 'http://'.Tools::getShopDomain(false, true).__PS_BASE_URI__, 'gsitemap_links' => Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'gsitemap_sitemap` WHERE id_shop = '.(int)$this->context->shop->id), 'store_metas' => Meta::getMetasByIdLang((int)$this->context->cookie->id_lang), 'gsitemap_disable_metas' => explode(',', Configuration::get('GSITEMAP_DISABLE_LINKS')), 'gsitemap_customer_limit' => array('max_exec_time' => (int)ini_get('max_execution_time'), 'memory_limit' => intval(ini_get('memory_limit'))), 'prestashop_version' => _PS_VERSION_ >= 1.5 ? '1.5' : '1.4', 'prestashop_ssl' => Configuration::get('PS_SSL_ENABLED'), 'gsitemap_check_image_file' => Configuration::get('GSITEMAP_CHECK_IMAGE_FILE'), 'shop' => $this->context->shop )); return $this->display(__FILE__, 'tpl/configuration.tpl'); } Edited January 19, 2014 by devein (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now