All Projects → vladsmirnov → Url Rewrites

vladsmirnov / Url Rewrites

Licence: mit
Magento 1.x module to target the URL Rewrite issue

Projects that are alternatives of or similar to Url Rewrites

Hookphp
HookPHP基于C扩展搭建内置AI编程的架构系统-支持微服务部署|热插拔业务组件-集成业务模型|权限模型|UI组件库|多模板|多平台|多域名|多终端|多语言-含常驻内存|前后分离|API平台|LUA QQ群:679116380
Stars: ✭ 575 (+3282.35%)
Mutual labels:  magento, composer
Magento Composer Installer
Composer installer for Magento modules
Stars: ✭ 204 (+1100%)
Mutual labels:  magento, composer
Magento Malware Scanner
Scanner, signatures and the largest collection of Magento malware
Stars: ✭ 608 (+3476.47%)
Mutual labels:  magento
Php Haloapi
This wrapper has for purpose to simplify the work of PHP developers who wants to use the official Halo API (beta).
Stars: ✭ 5 (-70.59%)
Mutual labels:  composer
Robot Loader
🍀 RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.
Stars: ✭ 690 (+3958.82%)
Mutual labels:  composer
Leafpub
Simple, beautiful, open source publishing.
Stars: ✭ 645 (+3694.12%)
Mutual labels:  composer
Composer Merge Plugin
Merge one or more additional composer.json files at Composer runtime
Stars: ✭ 718 (+4123.53%)
Mutual labels:  composer
Composer Normalize
🎵 Provides a composer plugin for normalizing composer.json.
Stars: ✭ 602 (+3441.18%)
Mutual labels:  composer
Postprocessing
A post processing library that provides the means to implement image filter effects for three.js.
Stars: ✭ 830 (+4782.35%)
Mutual labels:  composer
Sleepingowladmin
🦉 Administrative interface builder for Laravel (Laravel admin)
Stars: ✭ 671 (+3847.06%)
Mutual labels:  composer
Satis On Heroku
Your private Satis instance on Heroku, just one click away.
Stars: ✭ 5 (-70.59%)
Mutual labels:  composer
Magento Mirror
Magento Mirror
Stars: ✭ 655 (+3752.94%)
Mutual labels:  magento
Elasticsuite
Smile ElasticSuite - Magento 2 merchandising and search engine built on ElasticSearch
Stars: ✭ 647 (+3705.88%)
Mutual labels:  magento
Awesome Composer
😎 A curated awesome list for Composer, Packagist, Satis, Plugins, Scripts, Composer related resources, tutorials.
Stars: ✭ 738 (+4241.18%)
Mutual labels:  composer
Symfony Rest Edition
Fork from symfony-standard edition with additional rest features.
Stars: ✭ 643 (+3682.35%)
Mutual labels:  composer
Magento1 Sl Si
🇸🇮 Magento 1 Slovenian translations
Stars: ✭ 5 (-70.59%)
Mutual labels:  magento
Composer Mirror
Composer 全量镜像发布于2017年3月,曾不间断运行2年多。这个开源有助于理解 Composer 镜像的工作原理
Stars: ✭ 607 (+3470.59%)
Mutual labels:  composer
Telegram Api
Complete async capable Telegram bot API implementation for PHP7
Stars: ✭ 650 (+3723.53%)
Mutual labels:  composer
Composer
Dependency Manager for PHP
Stars: ✭ 25,994 (+152805.88%)
Mutual labels:  composer
Ical
iCal-creator for PHP
Stars: ✭ 891 (+5141.18%)
Mutual labels:  composer

Magento 1.9 CE Url Rewrite Fix

The issue

Magento 1.9 CE has an url rewrite issue. Magento create the extra entities (duplicates) in 'core_url_rewrite' tables on each reindexing of 'Catalog URL Rewrites'. This Magento module targets this issue and prevents creating duplicates in 'core_url_rewrites' table. However, if you have the running Magento installation, you probably have the duplicates in the database. This repository contains a dedicated Shell script that allows you to remove the duplicates from the database.

Installation

Via git

  • To apply this fix just clone this repository to Magento root directory

Via modman

  • Install modman
  • Use the command from your Magento installation folder: modman clone https://github.com/vladsmirnov/url-rewrites.git

Via Composer

  • Install composer
  • Create a composer.json into your project like the following sample:
{
    "require":{
            "vladsmirnov/url-rewrites":"*"
        },
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.firegento.com"
        }
    ]
}
  • From your composer.json folder: php composer.phar install or composer install

Removing duplicates (Shell script usage)

To removing all the extra entities from 'core_url_rewrites' table run this command:

php shell/rewrites.php cleanAll

If you don't want to remove all entities (this makes sense for SEO reasons, since the existing URLs might be cached by search engines) you should use an additional argument --except 'number'. With this additional argument script will delete all records except last 'number' rows.

For example, in this case script will delete all records, except last 5:

php shell/rewrites.php cleanAll --except 5

To get information about script commands run it with 'help' argument:

php shell/rewrites.php help

Contribution

You can contribute by creating the issue or the pull request.

Running the PHPUnit Tests

To run the tests your environment should has the PHPUnit testing framework.

How to install PHPUnit testing framework:

wget https://phar.phpunit.de/phpunit.phar

chmod +x phpunit.phar

sudo mv phpunit.phar /usr/local/bin/phpunit

phpunit --version
PHPUnit 6.4.0 by Sebastian Bergmann and contributors.

phpunit.de - Getting Started with PHPUnit

How to run:

  • Navigate to the test's directory via command:
cd dev/tests/integration 
  • And run:
phpunit

How it works:

After running the tests, will be created 4 test fixture products. Then will be called refreshProductRewrites() method which also calls while running 'Catalog Url Rewrite' reindex. If Magento will create an extra rewrites the test will be failed.

After tests end temp fixture products will be deleted from database.

Authors

This module is developed by Vladyslav Smirnov and Anton Boritskiy.

License

This project is licensed under the MIT License - see the LICENSE file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].