Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming custom field handle causes 'column not found' error when viewing existing segments #242

Closed
bliswebagency opened this issue Aug 9, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@bliswebagency
Copy link

Describe the bug

After renaming a custom field used by the contacts and trying to view the segments a server error occurs in ajax. The ajax response contains error message 'unknown column ', which references the original handle of the field.

{"error":"An exception has been thrown during the rendering of a template (\"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_theOldFieldName_xbaogzok' in...

We have temporarily got around this by removing the segments from the campaign_segments table, and manually re-entering them.

To reproduce

Steps to reproduce the behaviour:

  1. Create segment which uses custom field
  2. Rename custom field
  3. Return to segment listing, error occurs and no items listed

Expected behaviour

Created segments listed

Screenshots

If applicable, add screenshots to help explain your problem.

Versions

  • Plugin version: 1.20.2
  • Craft version: 3.7.8
@bliswebagency bliswebagency added the bug Something isn't working label Aug 9, 2021
@bencroker
Copy link
Collaborator

Yeah I can why this might be happening, we should really store a reference to the field rather than the field column name, or alternatively update it each time a field is updated. I'll address this for the next release, thanks for reporting!

@bencroker
Copy link
Collaborator

Fixed in fba248d for the next release.

@bliswebagency
Copy link
Author

Thank you for the fix!

@bencroker
Copy link
Collaborator

Released in version 1.21.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants