Cms: Cache not cleared for structure entries when sorted/rearranged

Created on 5 Mar 2020  路  3Comments  路  Source: craftcms/cms

Description

When moving a structure in the admin dashboard. The lft and rgt values are not updated in the GraphQL/Elements API when rearranged. If you update an entry these values will suddenly be updated correctly.

This seems to be a caching issue where the cache simply is not cleared when rearranging structures. I have only tested it with the GraphQL API but I assume it's the same for Elements as well considering GraphQL uses Elements. Clearing the cache from the utilities menu or updating an entry updates the arranged order as expected.

Steps to reproduce

  1. Create a structure (max 1 level, I have not tested with multi level structures)
  2. Add some basic fields to this structure
  3. Create at least two entries in this structure
  4. Check the order of the output of a GraphQL or Elements query where you query this structure's entries. Remember this order.
  5. Rearrange the structure entries, move an entry above another or vice versa.
  6. Check the order of the output of a GraphQL or Elements query again, the entries will be in the same order as before until you either clear cache through utilities or update any entry.

Additional info

  • Craft version: Craft Pro 3.4.9
  • PHP version: 7.4.3
  • Database driver & version: MySQL 5.5.5
  • Plugins & versions: Field Manager (2.1.1), Redactor (2.6.0.1), Redirect plugin for Craft 3 (1.0.23)

Most helpful comment

Oops. Thanks for reporting that! This has been fixed for the next Craft release!

All 3 comments

Oops. Thanks for reporting that! This has been fixed for the next Craft release!

3.4.10 is out now with the fix.

Awesome, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattstein picture mattstein  路  3Comments

RitterKnightCreative picture RitterKnightCreative  路  3Comments

michel-o picture michel-o  路  3Comments

angrybrad picture angrybrad  路  3Comments

rynpsc picture rynpsc  路  3Comments