MySQL error message (Website membership add on)
I'm revisiting a client's site that was built several years ago so I can make some changes. We're using the Website Membership add on (v1.07) with an older version of CMSB (v2.15). It was working fine before, but we're getting an error message when we try to add a new user to the system:
MySQL Error: Data truncated for column 'longitude' at row 1
Everything else about CMSB and the add on work fine. The only problem is with new members.
Anyone know what's causing this, please? Is it due to the software being older versions?
It sounds like this may be related to the Geocoding plugin.
Does the User Accounts table in the Section Editor have a "longitude" field? If yes, what is its Field Type and Column Type? (Column type is the unlabeled column to the left of the Action column. It should have values like "int(10) unsigned" and "mediumtext")
When I go to "Edit section" for the User Accounts, there is a longitude field. However, it isn't used for collecting information about users when we set up their accounts. I've attached a screenshot of the columns we're using.
One other thing I've noticed. There are already some user accounts that were created a while ago. If I change the password for one of them to something else, the username and new password don't work and the user can't log in. Is that connected to this problem?
That seems to have worked, thank you. However, when I login, there's an error message that appears at the top of the page:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/globalmedelite/web/htdocs/cmsAdmin/lib/login_functions.php on line 153
This also appears on all the pages when the user has logged in to see the members-only pages.
Is there a way to stop that showing, please? Everything else seems to be working fine.
EDIT: We're using version 2.15 of the CMS (which was launched May 2012) and version 1.07 of the website membership add-on (launched January 2012), so it might be that an upgrade is in order.
I can see that there's some custom code in your login_functions.php file which is the source of both this and the previous error. At first glance, it looks like it tries to save the account's location based on its address, and prevent logins to that account if the user isn't close enough geographically.
Upgrading is one way to get rid of this error, as it would simply overwrite the custom code. Another simple option would be to modify lines 247-248 in that file from:
This would disable the custom code without removing it entirely.
If instead, you'd like to try to salvage this functionality, it would require a more hands-on look to determine what caused it to stop working in the first place.
Let me know if you have any more questions.
My client has noticed another issue with the membership login page.
Is there a way of making sure the login fields aren't already populated with info when the user visits the login page? i.e. a way to set up the page so that the browser cache is cleared each time the user leaves and revisits the page? (See attachment 01-login.jpg)
From the screenshot, it looks like your client has a browser plugin (LastPass) that is auto-filling the login info. I wouldn't recommend trying to override browser plugin behavior. The login page itself does not store/load any login details to/from the cache.