• Resolved Sean Thompson

    (@seanthompson)


    Hi,

    I installed WP Super Simple Speed on a fresh WP install to test it out with the Above the Fold Optimization plugin. I got this error:

    Warning: Invalid argument supplied for foreach() in /home/homeincomehub/public_html/wp-content/plugins/wp-super-simple-speed/inc-functions.php on line 58

    I deactivated Above the Fold Optimization, but the error persists. It stays there when I have WP Super Simple Speed as the only active plugin besides Heartbeat Control.

    I would like to be able to use WPSSS because it includes a lot of features that would make it an alternative to multiple plugins.

    https://www.ads-software.com/plugins/wp-super-simple-speed/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author nolongerused

    (@rspublishing)

    Hi seanthompson,

    Thanks for using our plugin (and for reporting the issue). Let me look into this real quick and get back to you.

    Regards

    Plugin Author nolongerused

    (@rspublishing)

    Hi seanthompson,

    Sorry for delay. Had a peek at the code. While unable to replicate the error on my end (even with my debug set to true), i can tell you that the error is coming from the font-awesome deque function passing something to the foreach loop that is not an array. You could try and bypass this by casting the variable to an array in the loop. On line 57 of the inc-functions file, find this code:

    foreach($wp_styles -> registered as $registered) {

    and replace it with:

    foreach((array) $wp_styles -> registered as $registered) {

    See if that solves your error. If not, you could disable your error reporting to suppress the error. The function will still work.

    While at it, I ran into an undefined variable issue in the current version – which I have now fixed. Will push an update later today. DO let me know if the proposed solution works.

    Regards

    Plugin Author nolongerused

    (@rspublishing)

    Hi seanthompson,

    Pushed an update. Going to mark this thread as resolved for now. Should you need any further assistance, kindly send me an email, or simply post back.

    Regards

    Thread Starter Sean Thompson

    (@seanthompson)

    Thanks for your reply.

    I decided to give it another try on a different site. This one isn’t using Above the Fold Optimization. I installed WPSSS and when I activated it I got a blank white screen. I removed the WPSSS folder and I still couldn’t access plugins or settings. I had to remove the code it added to .htaccess and clear my browser for everything to work again.

    # WP Super Simple Speed by Rynaldo Stoltz Starts - https://wpemergencyroom.com/ #
    
    # Hotlink Protection Start #
    
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?homebizgreen.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]
    
    # Hotlink Protection End #
    
    # GZip Compression Start #
    
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/x-httpd-php
    AddOutputFilterByType DEFLATE application/x-httpd-fastphp
    AddOutputFilterByType DEFLATE image/svg+xml
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
    Header append Vary User-Agent env=!dont-vary
    </IfModule>
    
    # GZp Compression End #
    
    # Leverage Browser Cache Start #
    
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 1 year"
    ExpiresByType image/jpeg "access 1 year"
    ExpiresByType image/gif "access 1 year"
    ExpiresByType image/png "access 1 year"
    ExpiresByType text/css "access 1 month"
    ExpiresByType text/html "access 1 month"
    ExpiresByType application/pdf "access 1 month"
    ExpiresByType text/x-javascript "access 1 month"
    ExpiresByType application/x-shockwave-flash "access 1 month"
    ExpiresByType image/x-icon "access 1 year"
    ExpiresDefault "access 1 month"
    </IfModule>
    
    # Leverage Browser Cache End #
    
    # Caching of common files Start #
    
    <IfModule mod_headers.c>
    <FilesMatch "\.(ico|pdf|flv|swf|js|css|gif|png|jpg|jpeg|ico|txt|html|htm)$">
    Header set Cache-Control "max-age=2592000, public"
    </FilesMatch>
    </IfModule>
    
    # Caching of common files End #
    
    # Enable Keepalive Start #
    
    <ifModule mod_headers.c>
    Header set Connection keep-alive
    </ifModule>
    
    # Enable Keepalive end #
    
    # Use UTF-8 encoding Start #
    
    AddDefaultCharset utf-8
    
    # Use UTF-8 encoding End #
    
    # Enable Vary: Accept-Encoding Start #
    
    <IfModule mod_headers.c>
    <FilesMatch "\.(js|css|xml|gz)$">
    Header append Vary: Accept-Encoding
    </FilesMatch>
    </IfModule>
    
    # Enable Vary: Accept-Encoding end #
    
    # WP Super Simple Speed by Rynaldo Stoltz Ends - https://wpemergencyroom.com/ #

    The only other performance plugins I have on this site are Hyper Cache and Heartbeat Control.

    …Sean

    Plugin Author nolongerused

    (@rspublishing)

    Hi seanthompson,

    Apologies for the delayed response.

    Sounds like there may be a plugin/theme conflict on this specific installation. One way to test is to install this plugin on another site and see if it does the same. Please let me know so i can further remedy.

    Regards

    Thread Starter Sean Thompson

    (@seanthompson)

    Ok, I tried to install it on a site that just has some test content generated by the Fakerpress plugin, EWWW Image Optimizer, Onclick Popup and PopupAlly. I had the Schema theme installed. The same thing happened. I deleted EWWW, deactivated the rest of the plugins and switched to the default 2015 theme. I tried again and same thing.

    …Sean

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Seems to be working, but producing one error’ is closed to new replies.