joomla-extensions / weblinks

This repo is meant to hold the decoupled com_weblinks component and related code.
GNU General Public License v2.0
45 stars 88 forks source link

Handle situation where webslinks are trashed within trashed categories #496

Closed GeraintEdwards closed 2 years ago

GeraintEdwards commented 2 years ago

Summary of Changes

Ensure trashed weblinks and trashed categories are handled correctly. Revised code mirrors the code used in Joomla core e.g. com_content

Testing Instructions

Create a weblink category and a weblink within it. Trash the weblink and then trash the category . Then try rebuilding the finder index.

Expected result

Index is created correctly

Actual result

Error value of 'state' column is outside supported range and indexing crashes

Problem is because the trashed state of -2 can't be stored in the finder_taxonomy table where state is unsigned.

Documentation Changes Required

None

chmst commented 2 years ago

Thank you - will test asap. How nice to see you as first time contributor :)

joomdonation commented 2 years ago

I must be honest that I don't understand our Smart search works internal. However, I have compared the modified code in this PR with the code from finder plugin for com_content and it looks good. So I'm merging this PR. @chmst If you can run a test to make sure nothing broken, that would be great (I tested it myself, too)

Thanks @GeraintEdwards.