Forum

Thread tagged as: Question, Problem, Error

Product-items duplicated

This has happened for the second time now. The entire items of product items e.g. 300, has duplicated into 600, there's two versions of each one exactly the same.

While there are two versions, they can't be edited/saved, however deleting the duplicate fixes the item (so it can be edited/saved successfully).

With there being 100's of items, is it possible to clean up in the DB via phpMyAdmin?

Also, wondering why this has happened, seems to have happened just after a new upload or save.

James Hazelton

James Hazelton 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you using one of the Shop add-ons?

No.

<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_forms'
    );
Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, so what are these product items? Is it a multiple item region?

They're furniture product items, i.e. Title, Category, Price, Description, Images etc.

They are a Multiple Item region.

The issue appears to be an indexing issue. The DB size remains basically the same, however when viewing the list for all the Product-Items, you see every entry twice: i.e.

A chair
A chair 
B chair
B chair 
C armchair  
C armchair  
D chair
D chair     
E chair
E chair

If you go into one and edit and save, the save successful message comes up, however no actual changes were saved, the details are stuck / the same still.

If you delete one of the duplicates, then that item edits/saves properly as normal.

This duplication issue has just happened for the third time this morning.

The PHP server limits are a bit low (i.e. 64 MB and there's high res images that sometimes crash the server (500 error) as they exceed the server limit during resizing). However there's new products items added that are within the server limits and the duplication issue just (almost randomly) appears.

Is this a server issue or a perch issue?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Can you post your Diagnostic Report? We're just making guesses without it (this is why we ask for it when you create a thread)

PERCH INFORMATION

Perch: 2.8.19
Production mode: Production (100)
Installed apps: content (2.8.19), assets (2.8.19), categories (2.8.19), perch_forms (1.8.3), perch_backup (1.2)
DB driver: PDO
DB tables: perch2_categories, perch2_category_counts, perch2_category_sets, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_forms, perch2_forms_responses, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resource_log, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users
Users: 8
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_forms'
    );
Rachel Andrew

Rachel Andrew 394 points
Perch Support

The first thing you should do is update to the latest version. That will ensure you benefit from any fixes we've made.

It sounds most likely that this is an under-resourced server however we try and mitigate those kinds of problems in updates to Perch which you won't benefit from if you are not up to date.

Has there been a specific fix in the version(s) beyond the current for this issue?

Sometimes upgrading breaks other things.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Upgrading shouldn't break anything, and we can only offer support for the current version of the product.