Forum

Thread tagged as: Problem
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you try these and let me know if you get any errors?

DROP INDEX `idx_uni` ON `perch2_resource_log`;

ALTER IGNORE TABLE `perch2_resource_log` ADD UNIQUE INDEX `idx_uni` (`appID`, `itemFK`, `itemRowID`, `resourceID`);

No errors for either query

Drew McLellan

Drew McLellan 2638 points
Perch Support

Does perch2_resource_log now show a UNIQUE key for index idx_uni ?

Yes (i think).... this is the line in 'create syntax' from Sequel Pro

UNIQUE KEY idx_uni (appID,itemFK,itemRowID,resourceID),

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, that looks a lot better. It should have been fixed when you updated to 2.7.8, which is a bit confusing.

I didn't update to 2.7.8 that would be why. Sorry

When I read the update log it didn't seem like the fixes were relevant to this.

I'll update now.

Hi Drew

I have updated and am still getting a problem with this resources table getting rewritten.

I have had to import directly to the resources table since upgrading. The file that I used to upload to that table is here:

https://www.dropbox.com/s/7xlzccqzokkgfyd/localhost-decluttermetest-23-01-2015-17-25-resourcestable-merged.csv?dl=0

Could this process of importing the table have a part to play in this problem?

  • I import the resources table.
  • I upload the corresponding files to the perch/resources folder
  • The images work again across the site
  • I save some content in perch
  • The resources table and folder are returned back to their small size / fewer files.
Drew McLellan

Drew McLellan 2638 points
Perch Support

Unused resources will be removed when you save. Are you saying that resources that are in use are being removed?

Yes. Exactly.

It feels like Perch has another reference to these unused resources elsewhere in it's database. Perhaps my manual overwriting of the resources table is under the radar so to speak, hence it getting deleted upon saving.

Drew McLellan

Drew McLellan 2638 points
Perch Support

You're overriding the entire database, not just resources, correct?