Giter VIP home page Giter VIP logo

Comments (12)

shavounet avatar shavounet commented on August 22, 2024

FYI, I tested limiting the join (module-pimgento/Import/Helper/UrlRewrite.php:110) with

            ->joinLeft(
                array('u' => $urlRewriteTable),
                't._entity_id = u.entity_id 
                AND u.entity_type = "' . $code . '" 
                AND u.redirect_type = 0
                AND u.target_path = ' . $targetPathExpr . '
                AND u.store_id = ' . $storeId,
                array()
            )

But it doesn't work as expected, and the url_rewrite table is then messed up :
selection_031

There is a few lines missing, maybe because some locales are used more than once ?
selection_030

EDIT : I noticed a few holes in translations, this might be irrelevant... But if a translation is missing, it should use the default setting, and it doesn't look like the case...

from pimgento-2.

shavounet avatar shavounet commented on August 22, 2024

I don't have much time to debug right now, but it seems we have the exact same problem for products (which are created from scratch using Pimgento imports).

from pimgento-2.

wigman avatar wigman commented on August 22, 2024

facing the same issues. When a category name has changed in akeneo, urls are reported as duplicated:

Integrity constraint violation: 1062 Duplicate entry 'url.html-1' for key 'URL_REWRITE_REQUEST_PATH_STORE_ID', query was: INSERT INTO url_rewrite (url_rewrite_id, entity_type, entity_id, request_path, target_path, redirect_type, store_id, is_autogenerated) SELECT tmp_pimgento_rewrite.url_rewrite_id, "category" AS entity_type, tmp_pimgento_rewrite.entity_id, tmp_pimgento_rewrite.request_path, tmp_pimgento_rewrite.target_path, 0 AS redirect_type, tmp_pimgento_rewrite.store_id, 1 AS is_autogenerated FROM tmp_pimgento_rewrite WHERE (request_path <> old_request_path AND url_rewrite_id IS NOT NULL) ON DUPLICATE KEY UPDATE url_rewrite_id = VALUES(url_rewrite_id), entity_type = VALUES(entity_type), entity_id = VALUES(entity_id), request_path = VALUES(request_path), target_path = VALUES(target_path), redirect_type = VALUES(redirect_type), store_id = VALUES(store_id), is_autogenerated = VALUES(is_autogenerated)

We have 3 locales, of which 2 are Dutch/Belgium, which use the same names. The third is French.

from pimgento-2.

guido7171 avatar guido7171 commented on August 22, 2024

Thanks @shavounet for the quick leftjoin fix. I'm a little further now.

With this quick fix my categories seems to be imported ok for 4 languages.

The url_rewrite table is updated and seems to be ok, but the menuitem-urls on the frontend are still not rewrited. cache:clean doest fix it. indexer:reindex delete all category url_rewrites... strange

For product import i am using name-en_US-ecommerce as url_key.
In stores > configuration > catalog > pimgento > product i add the pim element: name-en_US with the magento attribute: url_key-en_US etcetera. Thats working ok now.

from pimgento-2.

wigman avatar wigman commented on August 22, 2024

Bump.. I'd really like a view on this from the DnD team.. are you not facing the same problems? @magentix

from pimgento-2.

peterjaap avatar peterjaap commented on August 22, 2024

+1 !!

from pimgento-2.

wigman avatar wigman commented on August 22, 2024

@peterjaap Created a pull-request, just for you.

Bit disappointing I never heard back. But grateful for the plugin, works perfect now.

from pimgento-2.

peterjaap avatar peterjaap commented on August 22, 2024

@wigman ❤️

from pimgento-2.

shavounet avatar shavounet commented on August 22, 2024

Thank you @wigman, I've successfully used your PR to apply a patch on Pimgento using https://github.com/cweagans/composer-patches and import my categories without failure !

from pimgento-2.

wigman avatar wigman commented on August 22, 2024

@shavounet Great, I'm glad it solved your problem:)

from pimgento-2.

guido7171 avatar guido7171 commented on August 22, 2024

Thank you @wigman i also tested your PR and it's working fine. Import categories & products 4 storeviews.

from pimgento-2.

shavounet avatar shavounet commented on August 22, 2024

It seems fixed in the lastest version (100.2.4)

from pimgento-2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.