Forum Replies Created
-
AuthorPosts
-
Steven Zahm
Keymaster@ Joshua
That would be odd that mysql workbench would be adding the extra characters. Generally I use phpMyAdmin to create custom user meta while testing and have not experience that issue. If you have that tool in your web host control panel, give it a try to see if the results are the same.
It is possible another plugin or the theme is hooking into the user meta calls and introducing those extra characters… that get much more tricky to track down it is the cause.
Glad I could help!
If you have a moment, I would truly appreciate a review as they really do make a difference.
https://wordpress.org/support/plugin/connections/reviews/
Thanks in advance for your time!
Steven Zahm
Keymaster@ Joshua
I believe the issue is the method that is being used to manually insert the
connections_entry_iduser meta in the DB (your code, I assume). I would examine how you are adding the entry ID value to the user meta.In regards to where
self::$entryIDis being set, it is in thesetEntryID()method. It is imply usingget_user_meta( get_current_user_id(), 'connections_entry_id', TRUE );to get the meta value. The value must already have had the added characters added.Steven Zahm
Keymaster@ Joshua
Right there is the issue… however you added the value to the DB it ended up as a 5 character string. It should have been an integer. Even a string would would work if it was
varstring(3) "662". Notice that instead of5it says3. The number is the number of character in the string.Adding the trim, although will “fix” the real source of the error is the value in the DB. I would recommend simple correcting the source value rather than trying to clean it up after the fact.
In any event, great to see you rooted out the issue.
Steven Zahm
Keymaster@ Joshua
If
var_dump( $result )is bool false the that mean the WP DB query did not return any results for the supplied ID.Just thought that info might help.
Steven Zahm
Keymaster@ Joshua
Can you
var_dump(self::$entryID);and post the result?Steven Zahm
Keymaster@ Age
Ok, perhaps when I finally get to adding a unified way to manage notifications I can add this.
Steven Zahm
Keymaster@ Age
Thanks, I added this to the Link plugin files
Steven Zahm
Keymaster@ Joshua
On the
inithook in WP Link will fetch the current logged in users meta value forconnections_entry_id. If found and there is a value is not empty or greater than 0 the entry with that ID is fetched from the DB and saved as a new Entry object unless when fetching that entry by ID does not return results.When the add/edit link is display, it checks if the Entry object exists and display edit if it does or add if it does not.
So, this background, I hope helps you track down the issue.
As a thought, to manually link a WP User and an Connections Entry… Link supports the User Switching plugin or did the last time I tested. So, make sure the WP User email address and the Connections Entry have identically matching email addresses and then “switch” to that user. This will trigger the linking which just updates the two fields in the DB as noted in a previous reply before setting up the variables as mentioned above in this reply.
Hope this helps, let me know.
Steven Zahm
Keymaster@ Age
No, those “From” settings are for the email being sent to the person receiving the email not the admin notification email. The admin notification goes to the admin and the from address is pulled from the WP General Settings for the admin email address.
Steven Zahm
KeymasterThis reply has been marked as private. -
AuthorPosts
