Forum Replies Created

Viewing 15 replies - 16 through 30 (of 57 total)
  • Thread Starter SoN9ne

    (@son9ne)

    Hello,

    I am referring to the mu-plugins directory. This would be the MUST-USE plugins. This currently is not supported as there is no solid way to scan the mu-plugins due to WordPress not having any clear structure for it.

    I was able to add mu-plugin support and posted that on the github repo that just links here: https://github.com/marcinkazmierski/Polylang—theme-translation/issues/7 (note, link messes up when posting here, there should be 3 - between PolyLang and theme.

    My solution was to add a Directory to the mu-plugins file so that it knows which directory to scan inside the mu-plugins directory. Another option would be to scan all directories inside the mu-plugins directory but I personally didn’t like that approach, although it wouldn’t require the Directory parameter in the mu proxy loader file.

    The issue with the mu-plugins was that it cannot scan the directories as there is no scanner for it. TTfP also does not do anything with plugins placed there. My patch above adds scanning to TTfP but I still need to play more with PolyLang to ensure this works as expected. I will update this later once I get to complete that task. I can confirm that as far as TTfP goes, this is working as expected. I can see and manage my mu-plugins translations now. The issue I have is that in WP-Admin, I am seeing the incorrect language for metaboxes in the MU Plugins but I believe this is a PolyLang issue and not relates to TTfP. I will update this later once I confirm the cause.

    I currently run a large site with WPML but performance is horrible so I am switching to PolyLang. My patch got this working but I had to go back to WPML for an update that needed to be added to PROD. I will be working back on PolyLang this week and next so I should be able to follow up after that.

    I still am unsure of how or if PolyLang integrates into mu-plugins but this is a requirement for me. I will be pushing PR to add this functionality if it doesn’t exist yet.

    I use the mu-plugins for internal plugins that are required for our sites. These are plugins I or my team wrote and we’ve been using mu-plugins for over 10 years this way. I am aware that most WordPress users may never need to use mu-plugins (or use them improperly) so this is why I don’t mind assisting with the development of this functionality.

    Either way, my patch I posted above will add MU Plugin support to TTfP. I just need to look into why I am experiencing issues with the translations in PolyLang but I don’t believe this has anything to do with TTfP.

    Thanks for your replies.

    • This reply was modified 3 years, 11 months ago by SoN9ne.
    • This reply was modified 3 years, 11 months ago by SoN9ne.
    • This reply was modified 3 years, 11 months ago by SoN9ne.
    Thread Starter SoN9ne

    (@son9ne)

    For further testing, I created a new WordPress website and installed only Query Monitor and this plugin. It still performs 6 queries. This makes it clear to be an issue with this plugin. Please optimize this as this is not ideal. I recommend to use the Object cache since it would cache it for the current request only.

    Thread Starter SoN9ne

    (@son9ne)

    Sounds good @rogierlankhorst. I look forward to the update.

    Thread Starter SoN9ne

    (@son9ne)

    THANK YOU!

    Thread Starter SoN9ne

    (@son9ne)

    Further investigation shows this is due to an issue with using symlinks for the wflogs directory…

    The error log entries point out the issue:

    
    [15-Apr-2020 17:50:24 UTC] PHP Warning:  file_get_contents(): open_basedir restriction in effect. File(/var/www/public/wp-content/wflogs//../../wp-config.php) is not within the allowed path(s): (/var/www/public/:/var/www/wordpress/:/usr/share/pear/:/usr/share/php/:/usr/share/httpd/:/tmp/:/dev/null:/dev/random:/dev/arandom:/dev/urandom:/mnt/efs/) in /var/www/public/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/utils.php on line 1081
    

    While this would appear to be /var/www/public/ it is, in fact, /mnt as the wflogs directory is located in /mnt/efs/wflogs. Since using a symbolic link, this would be expected behavior.

    The correct approach would be to use bind mounts so it actually acts as if it were in the directory. This is an issue on my end and as such, was simple to address and all is working well now.

    Thanks for your time

    • This reply was modified 6 years, 2 months ago by SoN9ne.

    FYI, it would be better practice to use:

    
    // Include file if function does not exist
    if (!function_exists('is_plugin_active')) {
        include_once(ABSPATH . 'wp-admin/includes/plugin.php');
    }
    

    Other than making your own. Sure it works but be careful with copying from core, especially if they change how that works. Minor issue but worth mentioning.

    Thread Starter SoN9ne

    (@son9ne)

    Issue appears to be a caching issue. Manually setting up wordfence-waf.php worked as expected.

    This is clearly explained by WordFence:

    Troubleshooting
    If installation completes without errors but the firewall still shows Basic WordPress Protection: Some servers have a delay, usually only up to 5 minutes before the changes will take effect, due to caching. Waiting for 5 minutes and checking again will solve the issue, if this is the case. If the “Click here to configure” button still appears after completing setup and waiting about 5 minutes, your host may not use the typical configuration files, such as .user.ini.

    • This reply was modified 6 years, 3 months ago by SoN9ne.
    • This reply was modified 6 years, 3 months ago by SoN9ne.
    Thread Starter SoN9ne

    (@son9ne)

    Folder structure is unclear, cannot edit so here is a better version:
    public
    – wp-content (all project files outside of WP)
    – wordpress (only vanilla WordPress files, no plugins/themes other than default)
    – index.php
    – etc. (other webroot files like .htaccess and wp-config.php)

    • This reply was modified 6 years, 3 months ago by SoN9ne.
    Thread Starter SoN9ne

    (@son9ne)

    That will not be possible. I will have to test this in a non-PROD environment but I have run into another issue with WordFence. Until I resolve that issue, this is still on the back-burner.

    I am currently in the process of purchasing a premium plan so I can escalate support for these issues.

    • This reply was modified 6 years, 3 months ago by SoN9ne.
    Forum: Plugins
    In reply to: [HyperDB] split existing db

    Yes, I would like to see these advanced documents too. I am working on a similar setup so this would help greatly. Thank you

    Thread Starter SoN9ne

    (@son9ne)

    Thanks for the suggestion.

    I tried this for less than 12 hours and it is still crashing the server. Same issue as I posted above. The wflogs directory is not listable again.

    I immediately disabled WordFence once this started. This time, my site did not recover right away.

    With WordFence disabled, the log was filling with:

    There are numerous occurrences of:

    
    [29-Mar-2020 20:03:57 UTC] PHP Warning:  file_get_contents(): open_basedir restriction in effect. File(/var/www/public/wp-content/wflogs//../../wp-config.php) is not within the allowed path(s): (/var/www/public/:/var/www/wordpress/:/usr/share/pear:/usr/share/php:/tmp/:/mnt/efs/) in /var/www/public/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/utils.php on line 1081
    [29-Mar-2020 20:03:57 UTC] PHP Warning:  file_get_contents(/var/www/public/wp-content/wflogs//../../wp-config.php): failed to open stream: Operation not permitted in /var/www/public/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/utils.php on line 1081
    

    This is interesting because /var/www/public/wp-content/wflogs//../../wp-config.php is looking into /var/www/public which is allowed. This is only an issue with WordFence so I’m going to have to look for alternatives at this point. System worked great until I enabled it again. I wonder if the extra / would cause any issue but I doubt it.

    The interesting part is that these logs only happen after I disabled WordFence. For this to stop, I actually need to delete WordFence from the system.

    Unfortunately, it will be some time before I can look deeper into the issue.

    I too have this issue. I noticed that wp_wc_product_meta_lookup has no SKUs and all data is either NULL or 0. This looks to be a new table so it seems the update failed but gave no indication.

    All my data looks like:
    '12', '', '0', '0', NULL, NULL, '0', NULL, 'instock', '0', '0.00', '0'

    I regenerated the Product lookup tables before I looked at this table as I was following this thread.

    What I had to do to get this working was to do this:
    IN WC > Status > Tools:
    – Upgrade database (Did this because I wanted to make sure it upgraded properly even though it was already done with no errors)
    – Manually ran: wc_update_product_lookup_tables_column with Args: 'column' => 'sku'

    Now my table has data. I ran Regenerate to see if this was the reason it had empty data but it seemed to be fine.

    Since I now have data but not all of it was correct, I manually ran the rest of the pending Scheduled Actions and I checked the table after every run to see if there was any issues. None was found.

    Not sure why this way worked to recover my system but it did.

    My DB was already updated and I had the new tables.

    I want to make note that I updated from 3.5.7 to 3.6.2 in-case that helps with anything.

    Thread Starter SoN9ne

    (@son9ne)

    I appreciate you looking into this. I am still not sure if I need to pay for support on this… I may just ignore this issue for now.

    I can confirm that replacing custom files with just the parent theme:

    {wp_content_dir}/themes/node/*.js
    {wp_content_dir}/themes/node/*.css
    {wp_content_dir}/themes/node/*.css.map
    {wp_content_dir}/themes/node/*.gif
    {wp_content_dir}/themes/node/*.jpg
    {wp_content_dir}/themes/node/*.png

    has given me 0 items when I click on upload custom files.

    I guess the real issue I have is why is this not included with the theme files? Why am I having to add this to the custom files?

    I don’t see any reason why this warrants a paid support tier. I consider this a bug and nothing I am paying to fix.

    Thanks again for your time.

    • This reply was modified 7 years, 9 months ago by SoN9ne.
    Thread Starter SoN9ne

    (@son9ne)

    This is my last issue with this topic:
    I now have the path for ABSPATH pointing to my webroot’s location of WordPress. This is a /wordpress location. I use a symlink to create the /wordpress location.

    The plugin, when I go to upload the wp-include files, actually tries to pull them from the actual path and not the symlink path. Seems this will not work with symlinks. Not really sure if this is anything that can be easily fixed.

    Webroot: /var/www/html
    WordPress Symlink path: /var/www/html/wordpress
    WordPress Absolute path: /var/www/wordpress/4.9.8

    The issue here is that the permissions are set differently on the absolute path. This is due to how the resources are to be managed. I would prefer it to use the symlink path as this would give it access.

    This is most likely outside any scope of support but something I thought would be worth mentioning.

    Thread Starter SoN9ne

    (@son9ne)

    Thanks for looking into this. I have my w3tc-config/master.php here: https://gist.github.com/jpSimkins/4ec2105875d0ddba36ecabf7db607c8a

    I removed my domain and my CloudFront Key/Secret.

    I do not have much caching enabled right now as I am still testing W3TC. For now, I am just testing the CDN and Origin Push parts of the system. Not sure if that information is helpful.

    Thanks

Viewing 15 replies - 16 through 30 (of 57 total)