Giter Club home page Giter Club logo

Comments (2)

magefan avatar magefan commented on August 17, 2024 1

Thank you for your report. To fix this issue, please use this fix 195e926 or update the extension to the newer version 2.11.3.1 (https://github.com/magefan/module-blog/releases/tag/2.11.3.1)

from module-blog.

lohoy avatar lohoy commented on August 17, 2024

Hello!

I fix the issue with this patch :

Index: Model/Post.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/Model/Post.php b/Model/Post.php
--- a/Model/Post.php
+++ b/Model/Post.php	(date 1714034007690)
@@ -668,7 +668,7 @@
                     try {
                         $category = $this->categoryRepository->getById($categoryId);
                         if ($category->getId() && $category->isVisibleOnStore($this->getStoreId())) {
-                            $this->_parentCategories[] = $category;
+                            $this->_parentCategories[$categoryId] = $category;
                         }
                     } catch (NoSuchEntityException $e) { }
                 }

Index: Model/UrlResolver.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/Model/UrlResolver.php b/Model/UrlResolver.php
--- a/Model/UrlResolver.php
+++ b/Model/UrlResolver.php (date 1714034007682)
@@ -187,7 +187,11 @@
                             $factory = Url::CONTROLLER_POST . 'Factory';
                             $model = $this->$factory->create()->load($postId);

-                            if (!$model->getCategoriesCount() || !$model->getParentCategories()->getItemById($categoryId)) {
+                            if (
+                                !$model->getCategoriesCount()
+                                || (array_key_exists($categoryId, $model->getParentCategories())
+                                    && !$model->getParentCategories()[$categoryId])
+                            ) {
                                 return null;
                             }
                         }

from module-blog.

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.