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

11th Step Meetings encoded incorrectly when imported via csv file #268

Closed
crispyatl opened this issue Jan 17, 2021 · 3 comments
Closed

11th Step Meetings encoded incorrectly when imported via csv file #268

crispyatl opened this issue Jan 17, 2021 · 3 comments

Comments

@crispyatl
Copy link
Contributor

In short, when you add a meeting through the web interface, the 11th Step Meeting code is stored as a string, but when you import it from a csv, it is stored as an int. This explains why only certain sites are affected by the issue: It occurs in the very specific corner case that an 11th Step Meeting is imported from a csv file.

This is the root cause of related issue #257. While PR #267 is now available to work around the issue, arguably the code that loads the csv should also be fixed.

If you add an 11th Step Meditation meeting in the web interface, it looks like this in the DB:

mysql> select meta_value from wp_postmeta where meta_id = 31737;
+---------------------------------+
| meta_value                      |
+---------------------------------+
| a:2:{i:0;s:1:"O";i:1;s:2:"11";} |
+---------------------------------+
1 row in set (0.00 sec)

However, if you import an 11th Step Meditation meeting from a csv file, it looks like this:

mysql> select meta_value from wp_postmeta where meta_id = 31763;
+-----------------------------+
| meta_value                  |
+-----------------------------+
| a:2:{i:0;s:1:"O";i:1;i:11;} |
+-----------------------------+
1 row in set (0.00 sec)
@crispyatl crispyatl added the bug label Jan 17, 2021
Carlsans added a commit to Carlsans/12-step-meeting-list that referenced this issue Mar 6, 2021
Carlsans added a commit to Carlsans/12-step-meeting-list that referenced this issue Mar 6, 2021
11th Step Meetings encoded incorrectly when imported via csv file bug correction
@joshreisner
Copy link
Contributor

I do see that if I create a meeting with 11th Step Meditation it is a string and if I import it from CSV it is an int, but it still shows up for me fine in the backend and in the frontend.

What is the negative effect other than the appearance of the record in SQL?

a:3:{i:0;s:2:"11";i:1;s:1:"P";i:2;s:3:"ONL";}

vs

a:3:{i:0;i:11;i:1;s:1:"P";i:2;s:3:"ONL";}

@apresence
Copy link

apresence commented Oct 16, 2021 via email

@brianw-area24 brianw-area24 added this to the TSML v3.15 milestone Apr 9, 2022
@joshreisner joshreisner removed this from the TSML v3.15 milestone Dec 8, 2022
@joshreisner
Copy link
Contributor

i'm going to close this - i feel like unless we get a report from the field that this caused an error that it isn't worth making an automated SQL update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants