plahta 0 Posted June 28, 2015 Report Share Posted June 28, 2015 Видимо после изменения URL (убрал отображение типа контента и расширение файлов) перестал отображаться файл sitemap.xml http://plahta.com.ua/google_sitemap.xml Как можно настроить корректную работу? Link to post Share on other sites
support 446 Posted June 28, 2015 Report Share Posted June 28, 2015 Да, 99% процентов, что в этом причина. Попробуйте в /app/Controller/SitemapsController.php закомментировать (или удалить): if (in_array(strtolower($raw_data['ContentType']['name']), $allowed_types)) { и ниже удалите } после $count ++ Link to post Share on other sites
plahta 0 Posted June 28, 2015 Author Report Share Posted June 28, 2015 Не помогло. Настройки/ Магазин/ Настройки магазина / Кэш чистил. Link to post Share on other sites
support 446 Posted June 28, 2015 Report Share Posted June 28, 2015 А Вы в файле не правили ничего?! Этот файл /app/Controller/SitemapsController.php тож не работает?! SitemapsController.php Link to post Share on other sites
plahta 0 Posted June 28, 2015 Author Report Share Posted June 28, 2015 Нет, не работает. Link to post Share on other sites
support 446 Posted June 28, 2015 Report Share Posted June 28, 2015 А попробуйте поменять: $content_list_data_conditions = array( 'Content.active' => '1', 'Content.show_in_menu' => '1' ); на: $content_list_data_conditions = array( 'Content.active' => '1' ); Link to post Share on other sites
plahta 0 Posted June 29, 2015 Author Report Share Posted June 29, 2015 Нет, не работает. Link to post Share on other sites
support 446 Posted June 29, 2015 Report Share Posted June 29, 2015 А пришлите ещё раз доступ на ftp. Попробую посмотреть "в-живую", что наывается. Так быстрее получится. Link to post Share on other sites
plahta 0 Posted June 29, 2015 Author Report Share Posted June 29, 2015 Отправил на emeil Link to post Share on other sites
support 446 Posted June 29, 2015 Report Share Posted June 29, 2015 Да, карта не работает потому что удалили тип контента из адреса. т.е. дело в строке /app/Config/routes.php Router::connect('/:content_alias', array('controller' => 'pages', 'action' => 'index')); Но можно немного обойти это. Просто открывать карту сайта как http://plahta.com.ua/sitemaps/google.xml Так будет работать. Но Вам всё равно в /app/Contrller/SitemapsController.php нужно удалить тип контента из адресов. т.е. искать в файле ['ContentType']['name'] и удалять, что б адреса в карте сайта были без типа контента. Link to post Share on other sites
plahta 0 Posted June 29, 2015 Author Report Share Posted June 29, 2015 Спасибо. Работает. Остается вопрос как удалить вывод в sitemap служебных страниц типа корзина, подтверждение заказа, результаты поиска и.т.п.: /cart-contents /checkout /confirmation /success /read-reviews /create-review /coupon-details /search-result /register /register-success /account /account_edit /my_orders /address_book /ask_a_product_question /one_click_buy /password_recovery Link to post Share on other sites
support 446 Posted June 29, 2015 Report Share Posted June 29, 2015 А зачем?! Они запрещены в http://plahta.com.ua/robots.txt /app/webroot/robots.txt robots.txt круче ведь карты сайта, в смысле поисковики ограничения ribitots.txt учитывают и не важно, что у Вас в xml карте есть эти ссылки. Link to post Share on other sites
support 446 Posted June 29, 2015 Report Share Posted June 29, 2015 Можно конечно напрямую отредактировать в phpMyAdmin эти страницы, в таблице contents и выставить им значение show_in_menu 0 Но смысла нет особого, насколько я понимаю. Главное, что в robots.txt запрещено. Link to post Share on other sites
plahta 0 Posted June 29, 2015 Author Report Share Posted June 29, 2015 Ок. Спасибо. Хотя как тут сделано красивее выглядит:) http://demo.vamshop.com/sitemaps/google.xml П.С. имеет смысл в FAQ добавить вопрос "где редактировать robots.txt" Link to post Share on other sites
support 446 Posted June 29, 2015 Report Share Posted June 29, 2015 А что там по ссылке?! Это стандартная версия VamShop 2, т.е. никак специальных правок для demo.vamshop.com не делалось. P.S. Добавил - Link to post Share on other sites
support 446 Posted June 29, 2015 Report Share Posted June 29, 2015 Дошло, что Вы имели в виде. :dad: Видимо, Вы вносили правки, что я выше указывал, поэтому и контент всех типов в карту сайта выводится. Верните оригинальный файл /app/Controller/SitemapsController.php Тогда в карте сайта будут только товары и категории. + раз Вы удалили из адресов тип контента, поправьте только этот момет, т.е. уберите из ссылок в SitemapsController.php только ['ContentType']['name'] , остальной код не трогайте. Link to post Share on other sites
plahta 0 Posted June 29, 2015 Author Report Share Posted June 29, 2015 Если в оригинальном файле /app/Controller/SitemapsController.php удалить ['ContentType'], и не делать другие правки, то файл создается, но он пустой. This XML file does not appear to have any style information associated with it. The document tree is shown below. ___________________________________________________________________________________________________ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"></urlset> Link to post Share on other sites
support 446 Posted June 29, 2015 Report Share Posted June 29, 2015 Верните оригинальный файл и попробуйте заменить только вот эту строку: $content_list[$count]['url'] = '/' . $raw_data['ContentType']['name'] . '/' . $raw_data['Content']['alias'] . $config['URL_EXTENSION']; на: $content_list[$count]['url'] = '/' . $raw_data['Content']['alias'] . $config['URL_EXTENSION']; Link to post Share on other sites
plahta 0 Posted June 29, 2015 Author Report Share Posted June 29, 2015 Отлично, работает. Спасибо. Link to post Share on other sites
plahta 0 Posted June 29, 2015 Author Report Share Posted June 29, 2015 Еще в faq про изменение url можно добавить совет про изменение sitemap.xml и robots.txt, про работу поиска по сайту Так новоприбывшим будет удобнее все в одном месте прочитать. Link to post Share on other sites
support 446 Posted June 29, 2015 Report Share Posted June 29, 2015 Не за что. Добавил - Link to post Share on other sites
avtomastersu 0 Posted March 24, 2017 Report Share Posted March 24, 2017 Хороший пост, по теме Sitemap. Проверил после правки SitemapsController.php карту сайта - сайт/sitemaps/google.xml работает нормально, а вот сайт/sitemaps/yandex.xml открывается только такая страница This XML file does not appear to have any style information associated with it. The document tree is shown below. <yml_catalog date="2017-03-24 10:03"> <script/> <shop> <name>Автооптзапчасть</name> <company>Автооптзапчасть</company> <url>http://avtomagazin.biz.ua/</url> <currencies> <currency id="UAH" rate="1"/> </currencies> <categories></categories> <offers> <offer id="110" available="true"> <url> http://avtomagazin.biz.ua/product/bashmak-cepi-21012103.html </url> <price>60.00</price> <currencyId>UAH</currencyId> <categoryId>101</categoryId> <picture>http://avtomagazin.biz.ua/img/content/17_0-250.png</picture> <name>Башмак цепи</name> <description>Башмак цепи для автомобиля ваз 2101 и др.</description> </offer> </offers> </shop> </yml_catalog> С чем это может быть связано, в настройках магазина ID в Яндекс Метрике указал. Т. е. открыватся только первый товар и все. Или можно в Яндекс отправлять карту сайта - сайт/sitemaps/google.xml карта то в принципе одна, это не расценится роботом как нарушение Link to post Share on other sites
support 446 Posted March 24, 2017 Report Share Posted March 24, 2017 3 часа назад, avtomastersu сказал: Хороший пост, по теме Sitemap. Проверил после правки SitemapsController.php карту сайта - сайт/sitemaps/google.xml работает нормально, а вот сайт/sitemaps/yandex.xml открывается только такая страница This XML file does not appear to have any style information associated with it. The document tree is shown below. <yml_catalog date="2017-03-24 10:03"> <script/> <shop> <name>Автооптзапчасть</name> <company>Автооптзапчасть</company> <url>http://avtomagazin.biz.ua/</url> <currencies> <currency id="UAH" rate="1"/> </currencies> <categories></categories> <offers> <offer id="110" available="true"> <url> http://avtomagazin.biz.ua/product/bashmak-cepi-21012103.html </url> <price>60.00</price> <currencyId>UAH</currencyId> <categoryId>101</categoryId> <picture>http://avtomagazin.biz.ua/img/content/17_0-250.png</picture> <name>Башмак цепи</name> <description>Башмак цепи для автомобиля ваз 2101 и др.</description> </offer> </offers> </shop> </yml_catalog> С чем это может быть связано, в настройках магазина ID в Яндекс Метрике указал. Т. е. открыватся только первый товар и все. Или можно в Яндекс отправлять карту сайта - сайт/sitemaps/google.xml карта то в принципе одна, это не расценится роботом как нарушение Так это файл для марткета. xml карта - сайт/sitemaps/google.xml Она ведь подходит и для google webmaster и для яндекс вебмастер. Link to post Share on other sites
avtomastersu 0 Posted March 24, 2017 Report Share Posted March 24, 2017 Понял, в моем случае она находится по адресу /sitemaps/google.xml , поменяю ее адрес в Метрике. Запустил сайт на новом VamSop 2, работает как пуля. Спасибо Link to post Share on other sites
support 446 Posted March 24, 2017 Report Share Posted March 24, 2017 Не за что Link to post Share on other sites
Recommended Posts