The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. Error on Magento database 301 bulk update

    Error on Magento database 301 bulk update

    Technical SEO Issues
    2 1 300
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • sedamiran
      sedamiran last edited by

      Hi all,

      One of my client has a magento website and I recently received received 404 errors for about 600 links on GWT and I tried to give 301 redirection via bulk upload but i get errors.

      It's magento 1.7 and I have following columns on csv file. I included first sample row as well.

      <colgroup><col width="120"><col width="71"><col width="120"><col width="402"><col width="253"><col width="120"><col width="120"><col width="120"><col width="120"><col width="120"></colgroup>
      | url_rewrite_id | store_id | id_path | request_path | target_path | is_system | options | description | category_id | product_id |
      | 125463 | 1 | 22342342_54335 | old_link | new_link | 0 | RP | NULL | NULL | NULL |

      |   |   |   |   |   |   |   |   |   |   |

      The error msg I receive is below. I was wondering if anyone has tried this before and if you know you how to fix this. Manual redirection works fine but probably this first 600 error is just a start, I'll be getting more 404 errors soon, somehow i need to figure out how to fix this. I appreciate if any one has experience on this and guide me through.

      Thanks in advance,

      Here is the error:

      SQL query:

      INSERT INTO 'mgn_core_url_rewrite'
      VALUES (

      'url_rewrite_id', 'store_id', 'id_path', 'request_path', 'target_path', 'is_system', 'options', 'description', 'category_id', 'product_id'

      )MySQL said:

      #1452 - Cannot add or update a child row: a foreign key constraint fails ('ayb_mgn2'.'mgn_core_url_rewrite', CONSTRAINT 'FK_101C92B9EEB71CACE176D24D46653EBA' FOREIGN KEY ('category_id') REFERENCES 'mgn_catalog_category_entity' ('entity_id') ON DELETE CASCADE ON)

      <colgroup><col width="120"><col width="71"><col width="120"><col width="402"><col width="253"><col width="120"><col width="120"><col width="120"><col width="120"><col width="120"></colgroup>
      |   |   |   |   |   |   |   |   |   |   |

      1 Reply Last reply Reply Quote 1
      • sedamiran
        sedamiran last edited by

        I didn't think there would be an extension for this but i just found one and it worked perfect for 301 redirection.

        http://www.magentocommerce.com/magento-connect/optimise-web-mass-301-redirects-1589.html

        In case anyone is interested:)

        1 Reply Last reply Reply Quote 1
        • 1 / 1
        • First post
          Last post
        • To 301 or not to 301?
          iHasco
          iHasco
          1
          4
          70

        • To 301 or not to 301?
          seorocket
          seorocket
          0
          3
          91

        • 301 vs 500 Errors for discontinued products
          19prince
          19prince
          0
          5
          209

        • Increase 404 errors or 301 redirects?
          tomhall90
          tomhall90
          0
          8
          1.4k

        • 404 errors is webmaster - should I 301 all pages?
          Oxfordcomma
          Oxfordcomma
          0
          5
          225

        • Where to put 301 redirects in Magento?
          IPROdigital
          IPROdigital
          0
          4
          686

        • Drupal Updates = errors
          Atlanta-SMO
          Atlanta-SMO
          0
          3
          379

        Get started with Moz Pro!

        Unlock the power of advanced SEO tools and data-driven insights.

        Start my free trial
        Products
        • Moz Pro
        • Moz Local
        • Moz API
        • Moz Data
        • STAT
        • Product Updates
        Moz Solutions
        • SMB Solutions
        • Agency Solutions
        • Enterprise Solutions
        • Digital Marketers
        Free SEO Tools
        • Domain Authority Checker
        • Link Explorer
        • Keyword Explorer
        • Competitive Research
        • Brand Authority Checker
        • Local Citation Checker
        • MozBar Extension
        • MozCast
        Resources
        • Blog
        • SEO Learning Center
        • Help Hub
        • Beginner's Guide to SEO
        • How-to Guides
        • Moz Academy
        • API Docs
        About Moz
        • About
        • Team
        • Careers
        • Contact
        Why Moz
        • Case Studies
        • Testimonials
        Get Involved
        • Become an Affiliate
        • MozCon
        • Webinars
        • Practical Marketer Series
        • MozPod
        Connect with us

        Contact the Help team

        Join our newsletter
        Moz logo
        © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
        • Accessibility
        • Terms of Use
        • Privacy