Post by liprotech.in » Thu Jul 11, 2024 9:03 pm

We are facing a serious issues while creating new category or modify old category. Our site is working fine from last 6-7 years on OpenCart. We regularly update Opencart and php version after verifying all the extension and theme support.
From last 5-6 months we are facing a serious issues, whenever we want to create a new category under a primary category, it's making multiple entry of subcategory.
like we have category A.
If we create a category B under primary category A. it is showing like this:
category A>category B>category A>category B>category A>category B>category A>category B>category A>category B>category A>category B>category A>category B>category A>category B>
Now if by mistek we add another one under categoryB, it's created approx 500 like this, website become unavailable sometime.

OpenCart Version 3.0.3.9
php 8.1.29
Hostgator VPS
Theme: Journal 3.2 (though this problem is same after disabling the theme)

Attachments

Screenshot 2024-07-11 182847.png

Screenshot 2024-07-11 182847.png (129.41 KiB) Viewed 640 times


PROSENJIT DAS
nationalpc.in
Lowest Price at your doorstep


User avatar
New member

Posts

Joined
Tue Oct 16, 2018 11:13 pm

Post by ADD Creative » Thu Jul 11, 2024 10:11 pm

Have you tried the rebuild categories button? Backup your database first.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by JNeuhoff » Thu Jul 11, 2024 10:19 pm

It's not likely to be an OpenCart issue. There is no such think as a Journal theme, the latter is a framework with a bunch of extensions (with many known issues), and it uses so-called skins, which aren't standard-compliant with OpenCart themes.

Try your category creations with a genuine OpenCart 3.0.3.9.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by liprotech.in » Thu Jul 11, 2024 10:45 pm

ADD Creative wrote:
Thu Jul 11, 2024 10:11 pm
Have you tried the rebuild categories button? Backup your database first.
How to do that?

PROSENJIT DAS
nationalpc.in
Lowest Price at your doorstep


User avatar
New member

Posts

Joined
Tue Oct 16, 2018 11:13 pm

Post by liprotech.in » Thu Jul 11, 2024 10:47 pm

JNeuhoff wrote:
Thu Jul 11, 2024 10:19 pm
It's not likely to be an OpenCart issue. There is no such think as a Journal theme, the latter is a framework with a bunch of extensions (with many known issues), and it uses so-called skins, which aren't standard-compliant with OpenCart themes.

Try your category creations with a genuine OpenCart 3.0.3.9.
We have tried disable the journal theme and same thing is hapenning.

PROSENJIT DAS
nationalpc.in
Lowest Price at your doorstep


User avatar
New member

Posts

Joined
Tue Oct 16, 2018 11:13 pm

Post by liprotech.in » Thu Jul 11, 2024 11:16 pm

As per our current solutions or internal checking, the problem is hepenning in "_category_path" table.
Like:
category a, id 3
category b, id 20,
category c, id 21
category d, id 107
for category d: a>b>c>d from perent category to sub category.
Before any modification of category, the entry on the "_category_path" is as follows:
INSERT INTO `npcoc_category_path` (`category_id`, `path_id`, `level`) VALUES
(107, 107, 3),
(107, 21, 2),
(107, 20, 1),
(107, 3, 0),
xxx
xxx
xxx
end of list (672 no line)

Now we make some changes on description of category a. After that the entry as follows:
INSERT INTO `npcoc_category_path` (`category_id`, `path_id`, `level`) VALUES
(107, 107, 3),
(107, 21, 2),
(107, 20, 1),
(107, 3, 0),
xxx
xxx
xxx
(107, 107, 3), (line no 684 additional line)
(107, 21, 2),
(107, 20, 1),
xxx
(107, 3, 0),
xxx (line no 1355)
end of list

One other example:
(84, 84, 3),
(84, 83, 2),
(84, 47, 1),
(84, 3, 0),
xxx
xxx
end of list

after edit of category id 3:
(84, 84, 3),
(84, 83, 2),
(84, 47, 1),
(84, 3, 1),
xxx
xxx
(84, 84, 3),
(84, 83, 2),
(84, 47, 1),
xxx
(84, 3, 0),
xxx
(84, 47, 2),
(84, 47, 3),
(84, 83, 4),
(84, 83, 5),
(84, 84, 6),
(84, 84, 7),
xxx
(84, 3, 1),
(84, 47, 2),
(84, 47, 3),
(84, 3, 4),
(84, 83, 5),
(84, 83, 6),
(84, 47, 7),
(84, 47, 8),
(84, 84, 9),
(84, 84, 10),
(84, 83, 11),
(84, 83, 12),
(84, 84, 13),
(84, 84, 14),
xxx (line no 1355)
end of list

PROSENJIT DAS
nationalpc.in
Lowest Price at your doorstep


User avatar
New member

Posts

Joined
Tue Oct 16, 2018 11:13 pm

Post by ADD Creative » Thu Jul 11, 2024 11:33 pm

liprotech.in wrote:
Thu Jul 11, 2024 10:45 pm
ADD Creative wrote:
Thu Jul 11, 2024 10:11 pm
Have you tried the rebuild categories button? Backup your database first.
How to do that?
On the Categories page it's the white button with the two arrows on the top right.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by JNeuhoff » Fri Jul 12, 2024 12:19 am

liprotech.in wrote:
Thu Jul 11, 2024 10:47 pm
JNeuhoff wrote:
Thu Jul 11, 2024 10:19 pm
It's not likely to be an OpenCart issue. There is no such think as a Journal theme, the latter is a framework with a bunch of extensions (with many known issues), and it uses so-called skins, which aren't standard-compliant with OpenCart themes.

Try your category creations with a genuine OpenCart 3.0.3.9.
We have tried disable the journal theme and same thing is hapenning.
It's not enough to 'disable the journal theme', it still uses the Journal framework with all the modified OpenCart core files.
You have to try it on a proper OpenCart 3.0.3.9.

Also try AddCreative's suggestion.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by liprotech.in » Fri Jul 12, 2024 5:02 pm

ADD Creative wrote:
Thu Jul 11, 2024 11:33 pm
liprotech.in wrote:
Thu Jul 11, 2024 10:45 pm
ADD Creative wrote:
Thu Jul 11, 2024 10:11 pm
Have you tried the rebuild categories button? Backup your database first.
How to do that?
On the Categories page it's the white button with the two arrows on the top right.
Thank you. Really greatfull for this suggestion. It's solve this issue temporary. It's save our huge time and effort.
Now after every changes on category, we are doing rebuild category again.

Before today, what we have done was store the "category_path" table from the database. After done changes on category, we replace the "category_path" table.

PROSENJIT DAS
nationalpc.in
Lowest Price at your doorstep


User avatar
New member

Posts

Joined
Tue Oct 16, 2018 11:13 pm

Post by ADD Creative » Fri Jul 12, 2024 6:35 pm

It would probably wise to check if admin/model/catalog/category.php has been modified, both directly and in storage/modification.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 23 guests