Hendrik Lersch
Forum Replies Created
-
Hello Larry,
i thought you mean something like this with “blackhole”. My bad ??Have you tried to uninstall that “invisible” plugin? I don’t know what kind of plugin it is, but some plugins only run in background without appearing anywhere in the control panel.
An uninstall should generally solve any problem with a specific plugin, except if it has create or modified files of your wordpress installation.
Hello, i have checked the source code of that plugin you mentioned and i don’t see a connection here. The plugins can’t affect each other. My plugin only handle scripts and styles, that are included via WordPress’s enqueue functions. That other plugin only prints, whatever you type into the backend fields, directly into the HTML code of your site.
But you say this is happened every time you click the update button, so there is most likely a problem with your bot trap (blackhole). My plugin uses AJAX to retrieve the scripts and styles data from your frontpage and store it into a database table. I assume that this remote AJAX call triggers your bot trap. Maybe it was a one time error and you only have to remove the entry from the list of bad bots. Otherwise you have to whitelist your own server to prevent blocking.
I hope this is helpful.
Best regardsI don’t see a relation here. The plugin didn’t remove any hooks. It just use them like any other plugin to insert it’s code at the right places.
The only things that will be removed are the registered scripts at some point, so they can conditionally registered afterwards.
Forum: Plugins
In reply to: [WP Scripts & Styles Optimizer] Feature requests please1. & 2. It’s both planned, but i can’t say any date. I want to release a new version with more features till the end of the year, but i’m very busy at the moment ??
3. Unfortunately i’ve never think about ordering functions. I will implement it with the next version
4. Is it, because you have so much scripts, that the list is too long and unclear? Maybe i could make a “shrink view” button or anything like that, where only the filename and the options stay visible. No promises, but i will look into it.
As always thanks for your feedback ??
- This reply was modified 8 years, 5 months ago by Hendrik Lersch.
Ok, i see that can be a bit confusing. The “global” tab represents all scripts & styles that are enqueued on your Front Page (The page, which you can set up under Settings->Reading).
Normally this covers the majority of enqueued files on a page. You can then set conditional filters to control under which circumstances these files are enqueued or not.
But sometimes thats not enough, because some plugins or themes enqueue their scripts only on specific pages and not on the Front Page. That’s why the tab “Single Pages” exist. Here you can get all scripts or styles for any other page of your site and manage them separately if needed. These settings also override the global settings for this specific page.
It’s not perfect at all, but i always try to improve it. Your feedback helps a lot.
The plugin performs 5 database requests per frontend page load, primarily during deregistering and registering of the scripts and styles. I don’t know exactly what requests you mean. How have you test it?
Normally WordPress doesn’t load any admin specific JavaScripts on the frontend part of the site. Every script on the frontend (even the WordPress core-files) is registered and enqueued via the appropriate functions. If there are any hardcoded scripts in the template-files, this plugin can’t handle them. But that’s a thing that no theme or plugin author should do.
is there a way to filter the js and css by user role? especially the bots/guests
You can set a rule for any file you want. It’s the last icon in the option bar of each item in the list. There you can choose the filter “Current User Role” and set it to anything you like. But of course it’s not a very comfortable way to sort out guests/bots. I think a new “logged in or not” filter would be good. I noted it ??
Forum: Plugins
In reply to: [WP Scripts & Styles Optimizer] How doe it play with wp rocket?There should be no problems with any caching plugin. But if you use the minification/concatenation features of WP Rocket and WP Scripts & Styles Optimizer at the same time that could lead to trouble. I’m working on the implementation of minification/concatenation features into my plugin, so that’s something that will hopefully be ready soon.
Forum: Plugins
In reply to: [WP Scripts & Styles Optimizer] conditional rules occurs fatal errorHello, sry for the late answer. I’ll try to give a few explanations ??
1) even you disable some js files, its not remove (for example new royal slider). And for single page options (which is awesome) how can I target homepage? I found it with longer link but its not apply anthing to it (eg: https://www.website.com/home-page)
If you see a file which is not deactivated, even though you have disabled it, then it’s most likely the case, that WordPress enqueued it nevertheless, because it’s internal script logic. However, it shouldn’t happen, since the plugin deregisters all files completely that are handled with it, before it register them again depending on the settings for each file.
I will investigate this. Have you experienced this with other plugins too, except the new royal slider?
That you can’t choose the front-page of your site on the “single pages” tab, has the simple reason, that these scripts are already “global” scripts. Every script or style that is added from third-party plugins, without further restrictions, where it should be enqueued, is automatically enqueued on the front-page of your site. For all other sites you have the possibility to use the “single-pages” tab.
Maybe i add an option at some time, to specify the site from which “global”-scripts are scraped. But right now i don’t see a big need to do this.
2) The urgent one is that fatal error occurs when I defined some simple conditional rules such as load contact form 7 js file if page is contact page.
Here is the message from source code:
<b>Fatal error</b>: Call to undefined function boolval() in
../public_html/wp-content/plugins/wp-script-optimizer/classes/conditions.class.php(715) : eval()’d code on line 1This sounds like you’re PHP version is too low. The
boolval()
function is only avaiable since PHP 5.5.0.
I use this function to make sure that i get nothing else back than a boolean true or false to check if a condtion is fulfilled or not. This is important due to security reasons.I wonder that defer and combine js/css soon which will impact more success on your plugin
I hope so ??
I’m working right now on these features like minify, combine, async/defer etc. But it’s a lot to do, so i can’t say how long it will take ??Best regards
Forum: Reviews
In reply to: [WP Scripts & Styles Optimizer] UselessI understand what you’re saying, but that’s in no way a proof that my plugin is the source of the problem in this situation. I’m not saying, that it’s not possible, but it’s very unlikely in my opinion. I always stick to the wordpress standards and use wordpress’s own native functions. I also can’t imagine how my code could produce an error like this.
It works fine with any script or style that is properly enqueued via the
wp_enqueue_xxx
functions.
But if you really think a 1 star rating is justified, i have to accept it..Forum: Reviews
In reply to: [WP Scripts & Styles Optimizer] UselessYou are apparrently the only one with a problem like this. I can’t imagine, how my plugin could have such an effect on other plugins, since it does actually nothing else than enqueue or dequeue scripts or styles under specific conditions. It don’t change the content of any JS or CSS file. So, if the file is there, where it should be, the function must be the same. Have you checked the html code, that the JS-file is enqueued at all?
It also cannot be a JavaScript issue with my own JS files for this plugin, because they are only loaded if you’re on the global or page-specific site’s of my plugin in the backend.
I would like to know, why you think, that the other plugin isn’t the error source? Maybe some non-wp-standards coding to enqueue their scripts? Too bad it’s a premium plugin. That makes it hard to figure out the problem, regardless of whether it’s my plugin or theirs. Is there a free version maybe?
Forum: Reviews
In reply to: [WP Scripts & Styles Optimizer] UselessI’m sry, that you had problems with this plugin. Maybe you can tell me, what problems you had exactly. Has it anything to do with javascripts or css files added from these other plugins?
And the reason why you have to refresh the list after a theme- or plugin-change is, that there could be new scripts or styles or some of them were removed. This can’t be done automatically yet, but it maybe will in future versions. But thats no reason to give it a 1 star rating, in my opinion, because it’s the normal behaviour.
The last thing you mentioned is right. That’s not a perfect solution at the moment and could obviously be improved. Maybe you give it a second chance with the next version, that will soon be ready.
Forum: Plugins
In reply to: [WP Scripts & Styles Optimizer] an error is occured: 0 errorSry for the late answer.
I don’t really know why the ajax call is rejected, but you can update the list manually as well
If you click the update button, the script perform an ajax request and call your home url with the additional parameter “?wpso=check”. So, if you call your home url manually with this parameter the script lists will be updated.
The error is very generic and only means, that the requested url is not reacheable for any reason. Maybe because of Wordfence or other security plugins. In that case you have to whitelist the requests from this plugin.
Forum: Plugins
In reply to: [WP Scripts & Styles Optimizer] an error is occured: 0 errorHello,
could you please tell me your wordpress version and the PHP-version, that is running on your server?
Have you tried a reinstall of the plugin?
I’m sorry, but you need wordpress 4.2.0 or above to run this plugin, because it uses functions they don’t exist before.
Unfortunately there is actually no version check in the plugin. It will be in the next version, so it won’t run on systems lower than WP 4.2.
Forum: Plugins
In reply to: [WP Scripts & Styles Optimizer] Move css is one time use?I have an idea, why google says its render-blocking. The wordpress admin bar html code is located at the bottom of the html document, right before the closing </body> tag, but it has an absolute positioning to appear at the top of the page.
But all the css in the footer will be printed before the admin bar HTML code, so the bar can only be rendered, when the CSS is fully processed by the browser. I will try to find a way, to put the CSS below the admin bar code. Thanks for this observation ??
The idea behind keeping old items in the list is to don’t delete any settings without user interaction. If you temporary deactivate a plugin or switch themes for testing purposes, you won’t lose all your settings. But you can delete them manually. I will include a button to clear all items at once in the next version, but i don’t think i will handle that automatically. There is also already a notice, if you change your plugins or your theme.
Because of the async thing, i don’t think it will be implemented into the core in the near future. There are some serious problems, mentioned here: