tedmaster
Forum Replies Created
-
Forum: Plugins
In reply to: [BuddyPress Activity Plus] user – post link- shows preview – doesn’t postIs this the same behavior as what is described here?
Thanks in advance.
Thanks for the reply. I see you’re using
network_site_url()to link to the service worker but perhaps you should be usingnetwork_home_url()? I don’t doubt you are excellent developers, just trying to move this along as it’s important for my particular project.For finding the installation root you can also use the technique shown here:
https://xnau.com/finding-the-wordpress-root-path-for-an-alternate-directory-structure/If I’ve followed your code correctly, you only need to change lines 47 and 53 to allow it to work in a non-standard hierarchy. At present I’m using a combo of filters and actions to work around this but it’s not really maintainable and a definitive solution would be greatly appreciated.
Kind regards,
Ted Stresen-Reuter
- This reply was modified 7 years, 5 months ago by tedmaster. Reason: Clarified what changes need to be made
Forum: Plugins
In reply to: [BuddyPress Activity Plus] Unable to post link after clicking Preview buttonHi again.
I just tried it again and now it’s working. It’s very odd because it was happening consistently enough for me to be able to document it. I have no idea what’s changed since I posted this. Regardless, at least the formatting issue is reproducible as are the two cancel links.
Thanks much for looking into this.
Kind regards,
Ted Stresen-Reuter
Bump…
Forum: Plugins
In reply to: [BuddyPress Activity Plus] Unable to post link after clicking Preview buttonHi Nastia,
Thanks for the reply. To answer your questions, no, it doesn’t happen with every URL but it does with the one I sent: https://missoulaweb.design/. Also, I noticed that with others (http://yahoo.com, for example) we have an even worse experience (nothing happens, blank screens and such – I can write up a more formal report but it could take a while…)
I would rule out plugins as I indeed tested with only the BuddyPress and BuddyPress Activity Plus plugins installed.
And thank you for forwarding on the formatting issue. Although it is only a cosmetic issue, users think the site is broken when they see things like that.
Kind regards,
Ted Stresen-Reuter
Just had this same problem. Tried all the same things as the original poster. Watched the error logs religiously while trying to log in and spotted a peculiar error:
[11-Oct-2017 23:48:37 UTC] WordPress database error Duplicate entry '0' for key 'PRIMARY' for query INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES (9, 'session_tokens', '(serialized array of private data)') made by wp_signon, wp_set_auth_cookie, WP_Session_Tokens->create, WP_Session_Tokens->update, WP_User_Meta_Session_Tokens->update_session, WP_User_Meta_Session_Tokens->update_sessions, update_user_meta, update_metadata, add_metadataThis led me to have a look at the users table. I noticed that one of the users had an ID of zero (0). This struck me as odd. I deleted that user but continued to see the error, so, instead of skimming it I actually read it and noticed that the table having the issue was the
wp_usermetatable, not thewp_userstable. That table also had a row with an ID of zero.Bottom line: if you are experiencing this problem it is very likely that the structure of the users and usermeta tables are incorrect. Specifically, both tables need AUTO_INCREMENT set on their ID columns.
https://stackoverflow.com/questions/5665571/auto-increment-in-phpmyadmin
https://stackoverflow.com/questions/1485668/how-to-set-initial-value-and-auto-increment-in-mysqlIf, upon trying to add the AUTO_INCREMENT option to the column you get an error about duplicate indexes, check to make sure you don’t have any rows already in the table where the ID (the column you are trying to modify) is set to zero. If so, delete that row and try the MySQL command again.
Happy trails to you… till we meet again!
- This reply was modified 8 years, 6 months ago by tedmaster. Reason: fixed code formatting for clearer reading
That’s helpful. Thanks. We’ll quadruple check directory permissions and report back with any anomalies.
Forum: Plugins
In reply to: [WP Rollback - Rollback Plugins and Themes] Roll back WordPress?Great plugin!
I agree that this would be a useful feature, and dangerous, but I wouldn’t worry about the WordPress developers. We have seen a few cases where (premium) plugins break when WordPress core is updated. Because the plugins were premium, access to prior (or newer) versions was not easy or even possible. Being able to rollback the WordPress core was really the only option. HTH as a use case.
Ted Stresen-Reuter
Forum: Developing with WordPress
In reply to: wp search-replace skipped tablesSeems to be what’s going on. Thanks a bunch. I hadn’t found that article in my searching!
FWIW, I changed __gaTracker to just ‘ga’ and added the window.location.href redirect as a callback function on ‘ga’. This seems to have made things better (goals are registering now).
I see. It seems I had the Debug checkbox ticked and that’s what was making that warning display and never go away.
But now that I’ve got your attention… We’re trying to integrate Contact Form 7, Google Analytics, and MonsterInsights, but we’ve also got Yoast installed.
Specifically, we’re trying to trigger an event (a goal) when a CF7 form is successfully submitted. The instructions for setting this up in CF7 are listed here:
We’ve got the goal set up in GA but when we load the page in question, we’re seeing a “ReferenceError: event is not defined” in frontend.min.js. A couple of days ago this was due to what appeared to be a syntax error in the non-minified version. That’s been fixed but we’re still seeing this error. The code we’re using to try and trigger the tracking of the event is:
if (typeof(__gaTracker) !== 'undefined') { __gaTracker(function() { window.ga = __gaTracker; }); } document.addEventListener('wpcf7mailsent', function(event) { __gaTracker('send', 'event', 'bankingsmart', 'signup', 'signup'); window.location.href = 'http://bankingsmart.me/thank-you/'; }, false);There are probably a few things wrong with the code above so feel free to make that clear… We suspect that part of the problem is that we ought to specify hitCallback as a parameter in the ga call, but we’re just not sure if __gaTracker is an exact clone of ga or not and if it is, can we trust the GA documentation on how to do this?
Any input is greatly appreciated.
+1 Also, this options wasn’t even visible until I changed some options in the Tracking tab.
Use this workaround to stop the error (but it might also introduce other errors or change functionality):
- delete frontend.min.js
- copy frontend.js to frontend.min.js
- Edit starting on line 392
- Change instances of ‘=’ to ‘:’
Thus this:
hitType = 'event', eventCategory = 'outbound-link', eventAction = link, eventLabel = valuesArray.title, hitCallback = __gaTrackerHitBack,becomes this:
hitType : 'event', eventCategory : 'outbound-link', eventAction : link, eventLabel : valuesArray.title, hitCallback : __gaTrackerHitBack,How did this pass QA?
- This reply was modified 9 years ago by tedmaster.
The error we are seeing is:
SyntaxError: Unexpected token '='. Expected a ':' following the property name 'hitType'.in frontend.min.js
Can we just dequeue this file? Based on the name, I don’t think it’s anything we use…
Thanks Saumya. We’re having the same problem and have a site scheduled to go live today.
Is there any way to revert to the previous version, which did work?
Kind regards,
Ted Stresen-Reuter