andynewby
Forum Replies Created
-
Forum: Plugins
In reply to: [W3 Total Cache] persistent error about _wc_session_Unfortunately I have the same issue ?? (latest release of W3TC)
I have the following settings:
Ignored query stems:
gdsr_ wp_rg_ _wp_session_
Yet I get:
In order for database caching to work with WooCommerce you must add _wc_session_ to the “Ignored Query Strings” option in W3 Total Cache settings here.
Also, there is a small typo there I believe ??
“Ignored Query Strings”
Should read:
“Ignored query stems:”
…as there is no such thing as “Ignored Query Strings” on that page =)
Any suggestions as to what to try to get that error to go away? I tried removing it and then re-adding (as the other guy said worked for him), but still it persists ??
Cheers
Andy
- This reply was modified 7 years, 11 months ago by andynewby.
Thanks for the reply. Yeah don’t think it’d be that for me. We’ve had it running on this server for over a year, and it only seems to be since the lasted update that it’s stopped working. I’ll keep digging :/
Hi,
When you say “redid” the DNS, what exactly do you mean? I’m getting this issue now too since 4.7.2 on nginx ??
Cheers
Andy
Forum: Plugins
In reply to: [MaxGalleria] FOUC – option to move scripts to header?The whole point of Lazy loading, is to save on speed – but the problem with a Masonry, is that it HAS to load the images before it can work out their dimensions (thus the problem). It’s not just an issue with this plugin – it’s just something “that is” I’m afraid
Forum: Fixing WordPress
In reply to: An unexpected error occurred when trying to search for pluginsHi,
Sorry, it’s been a manic week so I’ve only just got back to this (it’s only a personal project)
OK, so it sounds more like a server issue – so maybe I need to look into that.
PHP wise, I’m running:
php --version PHP 5.6.24-0+deb8u1 (cli) (built: Jul 26 2016 08:17:07) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
Curl looks fine:
curl --version curl 7.38.0 (x86_64-pc-linux-gnu) libcurl/7.38.0 OpenSSL/1.0.2d zlib/1.2.8 libidn/1.29 libssh2/1.4.3 librtmp/2.3 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smtp smtps telnet tftp Features: AsynchDNS IDN IPv6 Largefile GSS-API SPNEGO NTLM NTLM_WB SSL libz TLS-SRP
PHP seems to be correctly running as nginx:
ps aux | grep "php" nginx 3301 0.0 0.6 332344 25668 ? Ss 06:12 0:00 /usr/bin/php5-cgi nginx 3362 0.2 1.7 343948 69964 ? S 06:12 0:04 /usr/bin/php5-cgi nginx 3363 0.2 2.1 343556 85752 ? S 06:12 0:05 /usr/bin/php5-cgi nginx 3364 0.2 1.7 342884 69704 ? S 06:12 0:04 /usr/bin/php5-cgi nginx 3365 0.2 1.8 343764 73676 ? S 06:12 0:04 /usr/bin/php5-cgi nginx 3366 0.3 2.1 344236 85476 ? S 06:12 0:05 /usr/bin/php5-cgi nginx 3367 0.2 1.8 343020 73840 ? S 06:12 0:05 /usr/bin/php5-cgi root 3473 0.0 0.6 340948 26392 ? Ss 06:12 0:00 php-fpm: master process (/etc/php5/fpm/php-fpm.conf) www-data 3686 0.0 0.2 340948 8568 ? S 06:12 0:00 php-fpm: pool www www-data 3687 0.0 0.2 340948 8572 ? S 06:12 0:00 php-fpm: pool www root 5159 0.0 0.0 12744 912 pts/0 S+ 06:41 0:00 grep php
The server is using nginx.
File permissions are www-data:www-data
After seeing that, I thought I’d just give it a whirl of changing to nginx:nginx, and that seems to have done it ?? I no longer need extra FTP config setup, and the rest of the install seems to be behaving as well.
Thanks for your replies ??
Andy
Forum: Plugins
In reply to: [Debug Queries] Confused about accuracy of the times being returnedCool, thanks for the explanation ??
Forum: Hacks
In reply to: Getting stuff out of the main script-loader.phpThanks ?? Feels weird being back at work now!
Forum: Hacks
In reply to: Getting stuff out of the main script-loader.phpHi,
Sorry for the late reply. I actually managed to get it going before I left for Kenya (was doing some charity work, thus the late reply). The issue was that I wasn’t hooking it in correctly with the add_action() function. Doing that, it works like a charm now ??
Cheers
Andy
Forum: Hacks
In reply to: Getting stuff out of the main script-loader.phpThanks for the reply.
Yeah, I’m not going to go OTT (things like the admin functions css, js etc, and plugins that are only called on the homepage for example, I won’t bother with).
Currently I’m playing with this one:
https://thealpinepress.com/alpine-phototile-for-instagram/
In the file /plugins/alpine-photo-tile-for-instagram/gears/alpinebot-primary.php, we have:
wp_register_style($this->get_private('wcss'),$this->get_style('widget'),'',$this->get_private('ver'));
The output is:
<link rel='stylesheet' id='AlpinePhotoTiles_style-css' href='https://cdn.ladympresents.co.uk/wp-content/plugins/alpine-photo-tile-for-instagram/css/AlpinePhotoTiles_style.min.css' type='text/css' media='all' />
…so I assumed I could de-register it with:
wp_deregister_style( 'AlpinePhotoTiles_style-css' );
(I also tried it without -css at the end)
However, this doesn’t seem to remove it. Am I doing something wrong? Its been a while since I’ve played around with WP, so I’m a bit rusty with how the hooks work ??
Thanks!
Andy
Forum: Hacks
In reply to: Getting stuff out of the main script-loader.phpHi,
Yeah – I’m not actually too fussed about the admin side of things (as its only us who use that part). The issue I’m having, is that we have about 30 JS files and 30 CSS files on each page… and a vast majority of them are stupidly small (and could easily be just put in with the main JS/CSS file, and thus reduce the number of loads per page)
Are you familiar with the wp_enqueue_script and the wp_register_script functions that WordPress uses to add and remove scripts and CSS?
Yes, and no ?? I’ve fiddled around with it before. My understanding, is that you would call it like so in functions.php:
// register a CSS file wp_register_style( 'cb-child-stylesheet', get_stylesheet_directory_uri() . '/style-rtl.css', array(), '1.0', 'all' ); wp_enqueue_style('cb-child-stylesheet'); // enqueue it ... or to remove a CSS: wp_deregister_style( 'cb-child-stylesheet' ); // register a script wp_register_script( 'cb-lightbox', get_template_directory_uri() . '/library/js/jquery.fs.boxer.min.js', array( 'jquery' ),'', true); wp_enqueue_script( 'cb-lightbox' ); // enqueue it // remove a script wp_deregister_script( 'cb-lightbox' );
Does it need to be wrapped around anything? i.e a hook?
Thanks
Andy
Forum: Plugins
In reply to: [BJ Lazy Load] Broken in Chrome only?Ah man, that was it. Didn’t see the 2nd occurrence. Commented those out, re-compressed it, and all good now
Thanks for your time guys ??
Forum: Plugins
In reply to: [BJ Lazy Load] Broken in Chrome only?Thanks for the reply. Odd though. I tried commenting out the 2 lines you said – and it still doesn’t show for me :/
Forum: Plugins
In reply to: [WP CDN Rewrite] How to remove ver=xxx from end?Ah – never mind, worked it out. In wp-cdn-rewrite.php, I just commented out:
//add_filter('style_loader_src', array($this, 'replace_version'), 10); //add_filter('script_loader_src', array($this, 'replace_version'), 10);
That seems to have done it ??
Forum: Hacks
In reply to: Best way to remove plugins CSS/JS files?Ok, so making a bit of progress!
I’m not sure why $wp_scripts->queue doesn’t work – but this does:
global $wp_scripts; global $wp_styles; foreach ($wp_scripts->registered as $val) { echo "BLA: " . $val->handle . " at " . $val->src . " \n"; } foreach ($wp_styles->registered as $val) { echo "BLA: " . $val->handle . " at " . $val->src . " \n"; }
The weird thing though – is that
JS: utils at /wp-includes/js/utils.min.js JS: common at /wp-admin/js/common.min.js JS: wp-a11y at /wp-includes/js/wp-a11y.min.js JS: sack at /wp-includes/js/tw-sack.min.js JS: quicktags at /wp-includes/js/quicktags.min.js JS: colorpicker at /wp-includes/js/colorpicker.min.js JS: editor at /wp-admin/js/editor.min.js JS: wp-fullscreen at /wp-admin/js/wp-fullscreen.min.js JS: wp-ajax-response at /wp-includes/js/wp-ajax-response.min.js JS: wp-pointer at /wp-includes/js/wp-pointer.min.js JS: autosave at /wp-includes/js/autosave.min.js JS: heartbeat at /wp-includes/js/heartbeat.min.js JS: wp-auth-check at /wp-includes/js/wp-auth-check.min.js JS: wp-lists at /wp-includes/js/wp-lists.min.js JS: prototype at //ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js JS: scriptaculous-root at //ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js JS: scriptaculous-builder at //ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/builder.js JS: scriptaculous-dragdrop at //ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/dragdrop.js JS: scriptaculous-effects at //ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/effects.js JS: scriptaculous-slider at //ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/slider.js JS: scriptaculous-sound at //ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/sound.js JS: scriptaculous-controls at //ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/controls.js JS: scriptaculous at JS: cropper at /wp-includes/js/crop/cropper.js JS: jquery at JS: jquery-core at /wp-includes/js/jquery/jquery.js JS: jquery-migrate at /wp-includes/js/jquery/jquery-migrate.min.js JS: jquery-ui-core at /wp-includes/js/jquery/ui/core.min.js JS: jquery-effects-core at /wp-includes/js/jquery/ui/effect.min.js JS: jquery-effects-blind at /wp-includes/js/jquery/ui/effect-blind.min.js JS: jquery-effects-bounce at /wp-includes/js/jquery/ui/effect-bounce.min.js JS: jquery-effects-clip at /wp-includes/js/jquery/ui/effect-clip.min.js JS: jquery-effects-drop at /wp-includes/js/jquery/ui/effect-drop.min.js JS: jquery-effects-explode at /wp-includes/js/jquery/ui/effect-explode.min.js JS: jquery-effects-fade at /wp-includes/js/jquery/ui/effect-fade.min.js JS: jquery-effects-fold at /wp-includes/js/jquery/ui/effect-fold.min.js JS: jquery-effects-highlight at /wp-includes/js/jquery/ui/effect-highlight.min.js JS: jquery-effects-puff at /wp-includes/js/jquery/ui/effect-puff.min.js JS: jquery-effects-pulsate at /wp-includes/js/jquery/ui/effect-pulsate.min.js JS: jquery-effects-scale at /wp-includes/js/jquery/ui/effect-scale.min.js JS: jquery-effects-shake at /wp-includes/js/jquery/ui/effect-shake.min.js JS: jquery-effects-size at /wp-includes/js/jquery/ui/effect-size.min.js JS: jquery-effects-slide at /wp-includes/js/jquery/ui/effect-slide.min.js JS: jquery-effects-transfer at /wp-includes/js/jquery/ui/effect-transfer.min.js JS: jquery-ui-accordion at /wp-includes/js/jquery/ui/accordion.min.js JS: jquery-ui-autocomplete at /wp-includes/js/jquery/ui/autocomplete.min.js JS: jquery-ui-button at /wp-includes/js/jquery/ui/button.min.js JS: jquery-ui-datepicker at /wp-includes/js/jquery/ui/datepicker.min.js JS: jquery-ui-dialog at /wp-includes/js/jquery/ui/dialog.min.js JS: jquery-ui-draggable at /wp-includes/js/jquery/ui/draggable.min.js JS: jquery-ui-droppable at /wp-includes/js/jquery/ui/droppable.min.js JS: jquery-ui-menu at /wp-includes/js/jquery/ui/menu.min.js JS: jquery-ui-mouse at /wp-includes/js/jquery/ui/mouse.min.js JS: jquery-ui-position at /wp-includes/js/jquery/ui/position.min.js JS: jquery-ui-progressbar at /wp-includes/js/jquery/ui/progressbar.min.js JS: jquery-ui-resizable at /wp-includes/js/jquery/ui/resizable.min.js JS: jquery-ui-selectable at /wp-includes/js/jquery/ui/selectable.min.js JS: jquery-ui-selectmenu at /wp-includes/js/jquery/ui/selectmenu.min.js JS: jquery-ui-slider at /wp-includes/js/jquery/ui/slider.min.js JS: jquery-ui-sortable at /wp-includes/js/jquery/ui/sortable.min.js JS: jquery-ui-spinner at /wp-includes/js/jquery/ui/spinner.min.js JS: jquery-ui-tabs at /wp-includes/js/jquery/ui/tabs.min.js JS: jquery-ui-tooltip at /wp-includes/js/jquery/ui/tooltip.min.js JS: jquery-ui-widget at /wp-includes/js/jquery/ui/widget.min.js JS: jquery-form at /wp-includes/js/jquery/jquery.form.min.js JS: jquery-color at /wp-includes/js/jquery/jquery.color.min.js JS: suggest at /wp-includes/js/jquery/suggest.min.js JS: schedule at /wp-includes/js/jquery/jquery.schedule.js JS: jquery-query at /wp-includes/js/jquery/jquery.query.js JS: jquery-serialize-object at /wp-includes/js/jquery/jquery.serialize-object.js JS: jquery-hotkeys at /wp-includes/js/jquery/jquery.hotkeys.min.js JS: jquery-table-hotkeys at /wp-includes/js/jquery/jquery.table-hotkeys.min.js JS: jquery-touch-punch at /wp-includes/js/jquery/jquery.ui.touch-punch.js JS: masonry at /wp-includes/js/masonry.min.js JS: jquery-masonry at /wp-includes/js/jquery/jquery.masonry.min.js JS: thickbox at /wp-includes/js/thickbox/thickbox.js JS: jcrop at /wp-includes/js/jcrop/jquery.Jcrop.min.js JS: swfobject at /wp-includes/js/swfobject.js JS: plupload at /wp-includes/js/plupload/plupload.full.min.js JS: plupload-all at JS: plupload-html5 at JS: plupload-flash at JS: plupload-silverlight at JS: plupload-html4 at JS: plupload-handlers at /wp-includes/js/plupload/handlers.min.js JS: wp-plupload at /wp-includes/js/plupload/wp-plupload.min.js JS: swfupload at /wp-includes/js/swfupload/swfupload.js JS: swfupload-swfobject at /wp-includes/js/swfupload/plugins/swfupload.swfobject.js JS: swfupload-queue at /wp-includes/js/swfupload/plugins/swfupload.queue.js JS: swfupload-speed at /wp-includes/js/swfupload/plugins/swfupload.speed.js JS: swfupload-all at JS: swfupload-handlers at /wp-includes/js/swfupload/handlers.min.js JS: comment-reply at /wp-includes/js/comment-reply.min.js JS: json2 at /wp-includes/js/json2.min.js JS: underscore at /wp-includes/js/underscore.min.js JS: backbone at /wp-includes/js/backbone.min.js JS: wp-util at /wp-includes/js/wp-util.min.js JS: wp-backbone at /wp-includes/js/wp-backbone.min.js JS: revisions at /wp-admin/js/revisions.min.js JS: imgareaselect at /wp-includes/js/imgareaselect/jquery.imgareaselect.min.js JS: mediaelement at /wp-includes/js/mediaelement/mediaelement-and-player.min.js JS: wp-mediaelement at /wp-includes/js/mediaelement/wp-mediaelement.js JS: froogaloop at /wp-includes/js/mediaelement/froogaloop.min.js JS: wp-playlist at /wp-includes/js/mediaelement/wp-playlist.js JS: zxcvbn-async at /wp-includes/js/zxcvbn-async.min.js JS: password-strength-meter at /wp-admin/js/password-strength-meter.min.js JS: user-profile at /wp-admin/js/user-profile.min.js JS: language-chooser at /wp-admin/js/language-chooser.min.js JS: user-suggest at /wp-admin/js/user-suggest.min.js JS: admin-bar at /wp-includes/js/admin-bar.min.js JS: wplink at /wp-includes/js/wplink.min.js JS: wpdialogs at /wp-includes/js/wpdialog.min.js JS: word-count at /wp-admin/js/word-count.min.js JS: media-upload at /wp-admin/js/media-upload.min.js JS: hoverIntent at /wp-includes/js/hoverIntent.min.js JS: customize-base at /wp-includes/js/customize-base.min.js JS: customize-loader at /wp-includes/js/customize-loader.min.js JS: customize-preview at /wp-includes/js/customize-preview.min.js JS: customize-models at /wp-includes/js/customize-models.js JS: customize-views at /wp-includes/js/customize-views.js JS: customize-controls at /wp-admin/js/customize-controls.min.js JS: customize-widgets at /wp-admin/js/customize-widgets.min.js JS: customize-preview-widgets at /wp-includes/js/customize-preview-widgets.min.js JS: accordion at /wp-admin/js/accordion.min.js JS: shortcode at /wp-includes/js/shortcode.min.js JS: media-models at /wp-includes/js/media-models.min.js JS: media-views at /wp-includes/js/media-views.min.js JS: media-editor at /wp-includes/js/media-editor.min.js JS: media-audiovideo at /wp-includes/js/media-audiovideo.min.js JS: mce-view at /wp-includes/js/mce-view.min.js JS: login-with-ajax at https://steampunk-reviews.com/wp-content/themes/valenti/plugins/login-with-ajax/login-with-ajax.js CSS: colors at 1 CSS: wp-admin at /wp-admin/css/wp-admin.min.css CSS: login at /wp-admin/css/login.min.css CSS: install at /wp-admin/css/install.min.css CSS: wp-color-picker at /wp-admin/css/color-picker.min.css CSS: customize-controls at /wp-admin/css/customize-controls.min.css CSS: customize-widgets at /wp-admin/css/customize-widgets.min.css CSS: press-this at /wp-admin/css/press-this.min.css CSS: ie at /wp-admin/css/ie.min.css CSS: buttons at /wp-includes/css/buttons.min.css CSS: dashicons at /wp-includes/css/dashicons.min.css CSS: open-sans at //fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=latin,latin-ext CSS: admin-bar at /wp-includes/css/admin-bar.min.css CSS: wp-auth-check at /wp-includes/css/wp-auth-check.min.css CSS: editor-buttons at /wp-includes/css/editor.min.css CSS: media-views at /wp-includes/css/media-views.min.css CSS: wp-pointer at /wp-includes/css/wp-pointer.min.css CSS: imgareaselect at /wp-includes/js/imgareaselect/imgareaselect.css CSS: wp-jquery-ui-dialog at /wp-includes/css/jquery-ui-dialog.min.css CSS: mediaelement at /wp-includes/js/mediaelement/mediaelementplayer.min.css CSS: wp-mediaelement at /wp-includes/js/mediaelement/wp-mediaelement.css CSS: thickbox at /wp-includes/js/thickbox/thickbox.css CSS: media at /wp-admin/css/deprecated-media.min.css CSS: farbtastic at /wp-admin/css/farbtastic.css CSS: jcrop at /wp-includes/js/jcrop/jquery.Jcrop.min.css CSS: colors-fresh at CSS: login-with-ajax at https://steampunk-reviews.com/wp-content/themes/valenti/plugins/login-with-ajax/widget.css CSS: grunion.css at https://steampunk-reviews.com/wp-content/plugins/jetpack/modules/contact-form/css/grunion.css
..yet I can clearly see it in the HTML:
<link rel='stylesheet' id='jetpack_css-css' href='https://steampunk-reviews.com/wp-content/plugins/jetpack/css/jetpack.css?ver=3.5.3' type='text/css' media='all' />
Forum: Hacks
In reply to: Best way to remove plugins CSS/JS files?Thanks. The nuts thing, is that only shows the 1 item:
login-with-ajax | x
<!DOCTYPE html>If I add a bit more debugging into the functions.php call, I use:
global $wp_scripts; global $wp_styles; echo "Scripts: \n"; print_r($wp_scripts->queue); echo "\nStyles: \n"; print_r($wp_styles->queue);
and get:
Scripts: Array ( [0] => login-with-ajax ) \Styles: Array ( [0] => login-with-ajax )
Arrrrggh!
As an example, here is what I see in the HTML source on that same page:
<script type='text/javascript' src='https://steampunk-reviews.com/wp-includes/js/jquery/jquery.js?ver=1.11.2'></script> <script type='text/javascript' src='https://steampunk-reviews.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script> <script type='text/javascript' src='https://steampunk-reviews.com/wp-content/themes/valenti/plugins/login-with-ajax/login-with-ajax.js?ver=4.2.2'></script> <script type='text/javascript' src='https://maps.google.com/maps/api/js?sensor=false&ver=4.2.2'></script> <script type='text/javascript' src='https://steampunk-reviews.com/wp-content/plugins/contact-form-builder/js/if_gmap_front_end.js?ver=4.2.2'></script> <script type='text/javascript' src='https://steampunk-reviews.com/wp-content/plugins/contact-form-builder/js/cfm_main_front_end.js?ver=1.0.20'></script> <script type='text/javascript' src='https://steampunk-reviews.com/wp-content/themes/valenti/library/js/modernizr.custom.min.js?ver=2.6.2'></script>
and some of the CSS as well:
<link rel='stylesheet' id='common-css-css' href='https://steampunk-reviews.com/wp-content/common.min.css?ver=4.2.2' type='text/css' media='all' /> <link rel='stylesheet' id='open-sans-css' href='//fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=4.2.2' type='text/css' media='all' /> <link rel='stylesheet' id='dashicons-css' href='https://steampunk-reviews.com/wp-includes/css/dashicons.min.css?ver=4.2.2' type='text/css' media='all' /> <link rel='stylesheet' id='admin-bar-css' href='https://steampunk-reviews.com/wp-includes/css/admin-bar.min.css?ver=4.2.2' type='text/css' media='all' /> <link rel='stylesheet' id='jquery-ui-css' href='https://steampunk-reviews.com/wp-content/plugins/contact-form-builder/css/jquery-ui-1.10.3.custom.css?ver=4.2.2' type='text/css' media='all' /> <link rel='stylesheet' id='contact_form_maker_frontend-css' href='https://steampunk-reviews.com/wp-content/plugins/contact-form-builder/css/contact_form_maker_frontend.css?ver=4.2.2' type='text/css' media='all' /> <link rel='stylesheet' id='cb-main-stylesheet-css' href='https://steampunk-reviews.com/wp-content/themes/valenti/library/css/style.css?ver=4.0.3' type='text/css' media='all' /> <link rel='stylesheet' id='cb-font-stylesheet-css' href='//fonts.googleapis.com/css?family=Oswald%3A400%2C700%2C400italic%7COpen+Sans%3A400%2C700%2C400italic&subset=greek%2Cgreek-ext&ver=4.0.3' type='text/css' media='all' /> <link rel='stylesheet' id='fontawesome-css' href='https://steampunk-reviews.com/wp-content/themes/valenti/library/css/fontawesome/css/font-awesome.min.css?ver=4.3.0' type='text/css' media='all' />
The mind boggles ??