Making free navigation the default impacts existing content

Created on 21 June 2023, about 1 year ago
Updated 28 July 2023, 11 months ago

Problem/Motivation

It appears that free navigation has been made the default for trainings. When I updated Opigno to 3.1.0, it also changed my existing trainings from guided navigation to free navigation. My existing trainings use conditional paths, so I want them to use guided navigation. I could update the settings for my existing trainings back to guided navigation. However, I have over 100 and that will take forever. Plus, I don't think an update should change the settings for existing trainings.

Thanks!

πŸ› Bug report
Status

Postponed: needs info

Version

3.1

Component

Code

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @khorrocks@pcrm.org
  • πŸ‡¨πŸ‡­Switzerland axelm

    Hi Karen,

    This should not happen, and did not happen on the platforms that we upgraded.

    The "free navigation" is the default settings for new trainings created, but if you have before some trainings with "guided navigation", upgrading to the latest version of Opigno should not change these trainings from "guided navigation" to "free navigation".

    Could you please confirm that this is what happened ? If yes from which version of Opigno did you upgrade ? And was it some customized version or standard one ?

    Best regards,

  • Status changed to Postponed: needs info about 1 year ago
  • πŸ‡¨πŸ‡­Switzerland axelm
  • Yes, all of my courses that were previously guided navigation are now free navigation. I upgraded from version 3.0.9. I did have an issue during the database update where it timed out twice before completing.

  • πŸ‡¨πŸ‡­Switzerland axelm

    Thanks for your answer.
    It's very strange and something did not went as it should.
    Could you please tell me the hook_update_N() that failed twice for you ?
    That would be an interesting starting point to understand why the navigation mode was changed to "free".

  • It appears to have timed out on opigno_module_update_9004 both times.

  • πŸ‡¨πŸ‡­Switzerland axelm

    In this update we set the reference between module attempts and the latest training attempt for every user. Entities are not re-saved, the data is updated directly in the database and guided navigation checkbox state is not changed
    So this update cannot explain why your settings for navigation have been changed.
    Unfortunately that might be complicated to investigate why it occurred remotely.

  • I looked into the group__field_guided_navigation to try to determine what's going on. On my live site, which is version 3.0.9, this field is 0 for all trainings. It appears this field is 0 for guided navigation and 1 for free.

    On my development site, where I have version 3.1.0 installed, it appears that this has changed. The field is 0 for free navigation and 1 for guided. However, this field is still 0 for all trainings, which is why they are showing up as free navigation in the interface.

    Do you know which hook_update_N() updates the value in the group__field_guided_navigation table now that the meaning of this field has changed? I can checked to see if it was run. Thanks!

  • πŸ‡¨πŸ‡­Switzerland axelm

    Hi Karen
    It's not a hook_update_N() if the value in the database is not changed.
    There was a wrong detection of the field value and this was fixed.
    We checked again on our platforms and in UI we have the same value that is in DB.
    Maybe you had a custom fix to detect this field value and now it negates the result ?

  • I haven't added any custom code that impacts the field_guided_navigation field.

    I looked at the opigno_group_manager module code. In the previous version 3.0.3, the getGuidedNavigation function gets the field_guided_navigation field, then returns the opposite value:

    https://git.drupalcode.org/project/opigno_group_manager/-/blob/3.0.3/src...

    In the latest version 3.1.0, the getGuidedNavigation function gets the field_guided_navigation field and simply returns it:

    https://git.drupalcode.org/project/opigno_group_manager/-/blob/3.1.0/src...

    It seems as if the getGuidedNavigation function now returns the opposite of what it did before. I don't understand how you can do that without also updating the field_guided_navigation field for the existing content. What am I missing?

Production build 0.69.0 2024