doublesharp
Forum Replies Created
-
Forum: Plugins
In reply to: [WP LinkedIn] Your LinkedIn access token is invalid or has expiredI am still having this issue – the token seems to last for about 30 seconds before expiring. Just checked the time and all is well, I did need to change my timezone from EST to PST but the
Your LinkedIn access token is invalid or has expired, please click here to get a new one.
message continues to appear.Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] Meta Box – title repetition@emcniece There is some info on the ACF site on what is necessary to upgrade field add-ons from v3 to v4 here: https://www.advancedcustomfields.com/resources/getting-started/migrating-from-v3-to-v4/. Basically though, the API was updated with new function names and action/filter hooks.
I would love to be able to get back to this and get it upgraded (it’s actually preventing me from being able to upgrade to ACF 4.x on a couple of sites) but I haven’t had time with my work schedule. If anyone else wants to give it a shot in the meantime, I can provide the latest in my SVN repository (not www.remarpro.com).
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] Meta Box – title repetitionI’ve noticed similar behavior but will have to look into it before I can say what the problem is – probably the way the field wraps other fields it isn’t allowing some of the parameters to flow down to the wrapped field when displaying. This plugin will also require some updates for ACF 4.0+ which is on my plate for another project so I won’t be able to put it off too long ??
Busy with work now but I will update it as soon as I can.
Forum: Plugins
In reply to: [WooCommerce] Can't add products to cartThe problem is in your theme, not the plugins, specifically that it isn’t loading the jQuery plugin “mobileMenu”. In chrome the error is being reported on line 8 of
/wp-content/themes/max-magazine/js/custom.js
:Uncaught TypeError: Object [object Object] has no method 'mobileMenu'
jQuery('#nav .menu').mobileMenu({ defaultText: 'Navigate to...', className: 'select-menu', subMenuDash: '???–' });
Comment this out and (assuming there aren’t further errors) you should see the add to cart button.
Forum: Fixing WordPress
In reply to: 502 on LogoutNow I will respond to my own post in case anyone comes across this. The fix for me was including the following in my http{} block:
proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; fastcgi_buffer_size 16k; fastcgi_buffers 16 16k;
Forum: Fixing WordPress
In reply to: 502 on LogoutRaphael – I am having this problem as well but adding the proxy_* lines to both the http{} and server{} config sections didn’t seem to do the trick. Do you have any other tips on what you did to get it working in your environment?
I am on WordPress 3.5.1, BuddyPress 1.6.4, NginX 0.8.55, spawn-fcgi and PHP 5.4.
Thanks!
Forum: Fixing WordPress
In reply to: Image has failed to upload due to an errorI have the same problem – if I try to upload multiple images the first two work and all subsequent ones result in “The uploaded file was only partially uploaded.” Closing the Media Uploader and trying again, two by two, will allow all the files to upload.
WordPress 3.5.1
Centos 5.8 64bit
PHP 4.3
Apache/FastCGII posted some code that fixes the problem if you want to update it manually:
https://justin.ag/technology/google-analytics-for-wordpress-fixed/
Manually entering the UA code should work just fine, the only piece that has been broken was the automatic loading of Account and Property information from Google for the credentials you have authorized.
Not sure why it is taking so long to get fixed, but in the meantime I went ahead and fixed it myself if anyone cares to use it: https://justin.ag/technology/google-analytics-for-wordpress-fixed/
It will require you to manually edit the plugin code, but just cut and paste, and if anyone wants an SVN diff file I can upload that as well.
Forum: Plugins
In reply to: WooCommerce: remove related products infoAnother option if you don’t want to use a child theme is to use a functions plugin. The advantages of doing it this way is that you can change your theme without losing your customizations.
If you bought Theme A and use it with WooCommerce and later decide you want to use Theme B, you don’t have to create a new child them since the custom plugin is still active and loading the content of
/wp-content/plugins/functions.php
(though it has occurred to me that perhaps/wp-content/themes/functions.php
would be a better fit)You can see an example on my site here https://justin.ag/technology/wordpress-plugins/wordpress-plugin-custom-functions-php/
Forum: Plugins
In reply to: [Mingle Forum] Rewrite Rules Deleted/Inserted on every requestI take that back, the new add_filter rule eats up a ton of memory, so in the meantime I have commented it out entirely to prevent the rules from being re-inserted to the database on every request. Any ideas on a better action hook to prevent this?
Ahh, i think I know why – the plugins files are loading before functions.php, and the call in the slimstats plugin doesn’t use an action/filter hook so it executes immediately (which is why
$pagenow
isn’t available). With the filter being added in your theme, the call from the plugin happens before the filter is exists, so it doesn’t modify the results ofget_option()
.The reason it works for me is that I actually wrote a plugin to use instead of the functions.php file for code that I want to keep around even if I change themes, and it is set up to run before any of the other plugins.
If you want to do the same and use a filter instead of modifying the plugin, which I would recommend, you can set up your own custom functions.php plugin based on this code: https://justin.ag/technology/wordpress-plugins/wordpress-plugin-custom-functions-php/.
Basically just create a
custom-functions-php
folder in your plugins directory, add the code from that link to a file calledcustom-functions.php
and then include the filter from https://justin.ag/technology/activate-wp-slimstat-dashboard-widgets-in-wordpress-multisite/ in a file calledfunctions.php
in thecustom-functions-php
folder. Activate the newCustom functions.php
plugin in your admin and you should be good to go – it should work as a site or network-wide plugin depending on how you want to distribute the custom functions. Nifty for other code too.You would add this in your
/wp-content/themes/YOUR_THEME/functions.php
. The widgets won’t show up on your network dash board (/wp-admin/network/
) since it wouldn’t know what site to pull the stats for, but it will show up on the dashboards for your specific sites. I am using the code that I posted to my site (which should work for multisites using subfolders & subdomains) and it’s working for me.On second thought, a much better option than modifying the plugin code would be to use a filter on the
get_option('active_plugins')
to add the SlimStat plugin when it is active for multisite, so just add this to yourfunctions.php
:function activate_slimstat_dashboard_multisite($plugins){ // only run on multisite admin index screens ($pagenow isn't available, may need to mod if you are using subdirectories) if (is_multisite() && $_SERVER['SCRIPT_NAME'] == "/wp-admin/index.php"){ $slimstat_plugin = 'wp-slimstat/wp-slimstat.php'; // check if plugin is active network wide and if so add to site plugins if (array_key_exists($slimstat_plugin, get_site_option('active_sitewide_plugins', array()))) $plugins[] = $slimstat_plugin; } return $plugins; } add_filter( 'option_active_plugins', 'activate_slimstat_dashboard_multisite' );
EDIT: in the interest of not updating this post repeatedly, the latest working code is here – https://justin.ag/technology/activate-wp-slimstat-dashboard-widgets-in-wordpress-multisite/
The problem is that the
/wp-slimstat/wp-slimstat-dashboard.php
file is only checking to see if WP SlimStat is active for a particular site, not side wide. So you could presumably work around this by deactivating it for the network and then activating per site, or if you want to update the code to have the dashboard widgets file check the site-wide plugins as well, change line 12 of the file to read:$multisite_plugin_active = (is_multisite() && array_key_exists('wp-slimstat/wp-slimstat.php', get_site_option('active_sitewide_plugins', array())) ); if (!$multisite_plugin_active && !in_array('wp-slimstat/wp-slimstat.php', get_option('active_plugins', array()))) return;