Title: davidwebca's Replies | WordPress.org

---

# davidwebca

  [  ](https://wordpress.org/support/users/davidwebca/)

 *   [Profile](https://wordpress.org/support/users/davidwebca/)
 *   [Topics Started](https://wordpress.org/support/users/davidwebca/topics/)
 *   [Replies Created](https://wordpress.org/support/users/davidwebca/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/davidwebca/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/davidwebca/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/davidwebca/engagements/)
 *   [Favorites](https://wordpress.org/support/users/davidwebca/favorites/)

 Search replies:

## Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Post Rating] Getting fatal error on PHP8](https://wordpress.org/support/topic/getting-fatal-error-on-php8-2/)
 *  [davidwebca](https://wordpress.org/support/users/davidwebca/)
 * (@davidwebca)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/getting-fatal-error-on-php8-2/#post-16205649)
 * I am getting the same error, multiple people have reported this before.
 * [https://wordpress.org/support/topic/getting-fatal-error-on-php8/](https://wordpress.org/support/topic/getting-fatal-error-on-php8/)
 * Sadly, it’s impossible for me to rely on the “edit the plugin’s file” solution
   because of our deployment system which basically re-uploads plugins automatically.
   This needs to be fixed.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LiteSpeed Cache] Wrong webp path lookup with Bedrock](https://wordpress.org/support/topic/wrong-webp-path-lookup-with-bedrock/)
 *  Thread Starter [davidwebca](https://wordpress.org/support/users/davidwebca/)
 * (@davidwebca)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/wrong-webp-path-lookup-with-bedrock/#post-16132155)
 * I dug into the code and found this constant documented
 *     ```
       /**
        * Trying to fix pure /.htaccess rewrite to /wordpress case
        *
        * Add <code>define( 'LITESPEED_WP_REALPATH', '/wordpress' );</code> in wp-config.php in this case
        *
        * @internal #611001 - Combine & Minify not working?
        * @since  1.6.3
        */
       ```
   
 * So in my config/application.php file, I added
 *     ```
       Config::define( 'LITESPEED_WP_REALPATH', '/web' );
       ```
   
 * and it seemed to resolve this issue. I’m marking this as resolved and leaving
   it here in case someone else stumbles onto this issue, but I’d still like an 
   official opinion from Litespeed’s people to make sure I didn’t break anything
   else by doing that.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Jump Menu] Donate Link is Broken](https://wordpress.org/support/topic/donate-link-is-broken-2/)
 *  [davidwebca](https://wordpress.org/support/users/davidwebca/)
 * (@davidwebca)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/donate-link-is-broken-2/#post-15724953)
 * Sorry to chime in! Was this ever passed on? Or was the plugin put on Github? 
   Just to know where I could contribute too (if not here on the SVN repo).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LiteSpeed Cache] ESI + Pro Theme by Themeco](https://wordpress.org/support/topic/esi-pro-theme-by-themeco/)
 *  [davidwebca](https://wordpress.org/support/users/davidwebca/)
 * (@davidwebca)
 * [4 years ago](https://wordpress.org/support/topic/esi-pro-theme-by-themeco/#post-15647555)
 * If anyone stumbles onto the issue, this happens when saving a Gutenberg block
   that contains a nonce (like displaying a form) and will happen with ACF sometimes.
   You need to disable cache for logged in users which is enabled by default – if
   I’m not wrong. This problem still happens if the previously mentioned conditions
   are met on version 4.6 of the WordPress plugin.
    -  This reply was modified 4 years ago by [davidwebca](https://wordpress.org/support/users/davidwebca/).
 *   Forum: [Reviews](https://wordpress.org/support/forum/reviews/)
    In reply to:
   [[The Events Calendar] Does not follow WordPress standards](https://wordpress.org/support/topic/does-not-follow-wordpress-standards/)
 *  Thread Starter [davidwebca](https://wordpress.org/support/users/davidwebca/)
 * (@davidwebca)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/does-not-follow-wordpress-standards/#post-15420666)
 * Sorry if it came across rude, but I really struggled when I thought it was about
   to be easy. We decided to buy this plugin thinking it would save us time, but
   I spent way more than I would have if I had simply created a few Custom Post 
   Types. Only thing I’m glad I didn’t have to fight with is the month / week calendar
   views, but other than that I’ve struggled every step of the way.
 * Here are my notes, and those come from an advanced developer and programming 
   teacher of more than 15 years of experience working with WordPress for long time,
   so take that as you will.
 * –
 * 1. Hijacks the main WP_Query
 * The plugin Hijacks the main WP_Query and global post object. Depending on the
   moment in the execution chain, it’s sometimes impossible to get the main post
   and global query which prevents or complicates a lot of customizations on the
   theme developer part, but also adds an insane amount of uncompatibility with 
   other plugins.
 * 2. Uses proprietary functions to load templates
 * Instead of using pure “locate_template” and its accompanying functions, the plugin
   uses a private class wrapper (accessing “$this” in a template) and uses it’s “
   template” function. This was probably done because of #1, but because of that,
   it’s impossible pass down data to the templates, except with a custom folder 
   structure that totally defeats the purpose of having a specific template structure
   to override.
 * The template structure you use in your plugin isn’t the same as the one that 
   is suggested for the theme developers and the legacy for the single views that
   is still supported makes a mess out of the views that we need to override (my
   theme currently has /tribe-events/, /tribe/events-pro/, /tribe/events/ and their
   v2 sub-folders each).
 * You should not hijack the main WP_Query like you do. You’re probably doing that
   to let users select a base template in the admin interface and “wrap” your content
   with it, but it’s just bypassing 99% of the useful action hooks and filters that
   developers use to inject content here and there. (Ex.: hook into locate_template
   to use a different view render engine like roots/sage’s blade or timber twig,
   namely).
 * 3. Ajax should be an option
 * The new way that you refresh content in v2 is cool, but since it’s reloading 
   the whole sub-view, overriding the header bar is repetitive and clunky. Plus,
   when an URL is faulty in the output, it’s harder to debug if there’s no global
   switch to deactivate it.
 * 4. Faulty code wrapper around caching
 * Because of the complexity of the caching layer you’re adding over almost everything,
   I haven’t been able to pin point exactly why, but it’s impossible to save the
   rewrite URLs in the admin without them being cached wrong – (?:events) params
   are added to the cached urls which prevents switching views. I have to flush 
   the rewrite rules (your transient / cache trigger) with wp-cli to force it to
   flush and regenerate correctly with the events slug. Plus, it’s only set to invalidate
   and hooked when you save permalinks, but because of the way some hooks are registered,
   flushing permalinks from the admin wouldn’t work so I had to use WP CLI.
 * The fact that I had to search for that and dig down into the code because I didn’t
   find any information on why would my views and URLs not rewrite and clear properly
   is indicative of an over-complex solution for what seems to be a non problem.
   Caching probably shouldn’t be implemented by this plugin, but added by end-developers
   on a case-by-case basis or added as an option or an add-on plugin. There’s only
   one option to disable one of the cache, but I wish I could also have removed 
   your internal rewrite cache when I encountered errors in it because of translation
   issues (specified below).
 * 5. Messy usage of text domains
 * The plugins have multiple text domain used each which clutters WPML’s string 
   translation dropdown menu, namely ‘tribe-events-pro’, ‘events-pro’, ‘tribe-events’,‘
   events-calendar-pro’, ‘event-tickets’, ‘tribe-common’ to name a few.
 * 6. Wrong registration of translation strings
 * For example, the slugs: src/Tribe/Main.php:2662 to 2667. The slugs translations
   should always be identified by your translation functions with a context – using
   _x() instead of __() – because there are 2 exactly same words “event” registered,
   but one of them is “lowercase event” and the other one is “slug for post type”.
   I had to dig in the code to find out why my default slug was “vnement” instead
   of “evenements”. It’s because “évènements” was entered in the French translation
   of that word which is okay for the first one, but not for slugs and somehow your
   function rips out accents instead of them being sanitized through WordPress’ 
   default slug generation. The default WordPress slug generation creates “evenements”
   correctly, so you should probably rework the code to use WordPress’s internal
   functions down the road. TL:DR; – The plugin is effectively broken in French (
   maybe other languages) because your custom rewrite layer isn’t able to replace
   the post type query var because accents weren’t properly sanitized.
 * –
 * I hope these notes don’t feel like I’m rude or anything, but I had to make sure
   to pass these comments for the sake of your future buyers.
 * Regars.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Seriously Simple Podcasting] 2.9.9 fix_template_hierarchy breaks template hierarchy](https://wordpress.org/support/topic/2-9-9-fix_template_hierarchy-breaks-template-hierarchy/)
 *  Thread Starter [davidwebca](https://wordpress.org/support/users/davidwebca/)
 * (@davidwebca)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/2-9-9-fix_template_hierarchy-breaks-template-hierarchy/#post-15186125)
 * 1. Oh, sorry! I meant for the post tags since there is a condition check for 
   those. Otherwise, even without the filter, my archive-podcast.php gets picked
   up for the post type archive, so I was confused.
 * 2. Nice!
 * 3. Glad to hear.
 * 4. No worries, I was just wondering.
 * Thanks for your follow-up and I wish you and your family Happy Holidays!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[BCM Duplicate Menu] Bug when debug is activated](https://wordpress.org/support/topic/bug-when-debug-is-activated/)
 *  Thread Starter [davidwebca](https://wordpress.org/support/users/davidwebca/)
 * (@davidwebca)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/bug-when-debug-is-activated/#post-14590133)
 * I just started developing another website since that that initial message and
   I had the same problem so hacked in a little bit of code to prevent the issue
   by filling the “menu” query string key manually with a fake value. This prevents
   the crash and lets WordPress show the last menu modified like it’s supposed to
   do.
 *     ```
       add_action('admin_head', function() {
           $current_screen = get_current_screen();
           if($current_screen->id == 'nav-menus' && !isset($_GET['menu'])) {
               $_GET['menu'] = '-1';
           }
       });
       ```
   
 * Just thought I would share and write it down here in case someone stumbles on
   this.
    -  This reply was modified 4 years, 10 months ago by [davidwebca](https://wordpress.org/support/users/davidwebca/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Forms for ACF] Validation breaks after upgrade to ACF 5.9.5](https://wordpress.org/support/topic/validation-brakes-after-upgrade-to-acf-5-9-5/)
 *  [davidwebca](https://wordpress.org/support/users/davidwebca/)
 * (@davidwebca)
 * [5 years ago](https://wordpress.org/support/topic/validation-brakes-after-upgrade-to-acf-5-9-5/#post-14367195)
 * I’m updating this post for myself lel (and in case someone’s running into the
   issue).
 * In the end, forcing the translation of ‘af_form’ for polylang seems to solve 
   the issue in a cleaner way. Some forms we didn’t want to translate for ease of
   use throughout the admin, but in the end, it’s way better to translate the damn
   thing.
 *     ```
       add_filter('pll_get_post_types', function($post_types, $hide) {
           $post_types['af_form'] = 'af_form';
           return $post_types;
       }, 10, 2);
       ```
   
 * You’ll have to manually assign languages to the ones created before applying 
   this code. Polylang doesn’t offer the option to tick “af_form” in the admin for
   some reason (must be marked as a hidden post type) and in such, we have to add
   this code to force it to be translatable.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Forms for ACF] Validation breaks after upgrade to ACF 5.9.5](https://wordpress.org/support/topic/validation-brakes-after-upgrade-to-acf-5-9-5/)
 *  [davidwebca](https://wordpress.org/support/users/davidwebca/)
 * (@davidwebca)
 * [5 years ago](https://wordpress.org/support/topic/validation-brakes-after-upgrade-to-acf-5-9-5/#post-14367081)
 * I think I found the issue, so it might not be related to 5.9.5+ as I expected.
 * My issue is with Polylang = the function “af_form_post_from_key” gets used to
   request the form submitted in “forms-submission.php” and this function uses a
   WP_Query which doesn’t contain the “lang” param used by Polylang.
 * One would think that polylang’s filters would kick in and add that query param
   automatically to every custom post type that concerns it, but it doesn’t seem
   to be the case.
 * 2 possible solutions :
    1. af_form_post_from_key could be edited to include a language param. Adding a 
       check for “ICL_LANGUAGE_CODE” would add compatibility with WPML and Polylang
       at the same time.
    2. We add a filter ourselves in all WP_Query calls that contain “af_form” to make
       sure we force the “lang” param correctly (possibly with pre_get_posts + some
       extra checks).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Forms for ACF] Validation breaks after upgrade to ACF 5.9.5](https://wordpress.org/support/topic/validation-brakes-after-upgrade-to-acf-5-9-5/)
 *  [davidwebca](https://wordpress.org/support/users/davidwebca/)
 * (@davidwebca)
 * [5 years ago](https://wordpress.org/support/topic/validation-brakes-after-upgrade-to-acf-5-9-5/#post-14366803)
 * I’m also having problem with a form lately. I still haven’t been able to pinpoint
   the problem. I can’t submit a form, it always stops at the “Your submission failed.
   Please reload the page and try again.”
 * You can view the problematic form here: [https://alta.firmecreative.com/demande-de-soumission/](https://alta.firmecreative.com/demande-de-soumission/)
 * The website is in staging, but nothing confidential. Feel free to submit the 
   form as many times as you’d like. The nonce / sha256 decode doesn’t seem to be
   able to work, it never matches.
 * How does it encode the value?
 * I’m on latest 1.8 and latest ACF as well.
 * Plugins installed :
    | acf-options-for-polylang | inactive | none | 1.1.8 | |
   advanced-forms | active | none | 1.8.0 | | bcm-duplicate-menu | active | none
   | 1.0.4 | | polylang | active | none | 3.0.3 | | wp-polylang-translate-rewrite-
   slug | active | none | 0.3.6 | | safe-svg | active | none | 1.9.9 | | duplicate-
   post | active | none | 4.1.2 | | wordpress-seo | active | available | 15.9.2 
   | | bedrock-autoloader | must-use | none | 1.0.1 |
 * Plugins loaded through Bedrock’s must-use autoloader :
    Advanced Custom Fields:
   CPT Options Pages 2.0.6 Advanced Custom Fields PRO 5.9.5 Advanced Custom Fields:
   Editor Palette Field 1.0.7 Advanced Custom Fields: SVG Icon 2.0.4 Enable Media
   Replace 3.5.0 Favicon by RealFaviconGenerator 1.3.20 Intuitive Custom Post Order
   3.1.2.1
    -  This reply was modified 5 years ago by [davidwebca](https://wordpress.org/support/users/davidwebca/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Enable Media Replace] Not replacing images in Gutenberg / WordPress core image block](https://wordpress.org/support/topic/not-replacing-images-in-gutenberg-wordpress-core-image-block/)
 *  Thread Starter [davidwebca](https://wordpress.org/support/users/davidwebca/)
 * (@davidwebca)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/not-replacing-images-in-gutenberg-wordpress-core-image-block/#post-13922825)
 * Hi! I’m definitely using the latest version, but one thing that I think could
   be the issue is that I’m using Soil from Roots ([https://github.com/roots/soil](https://github.com/roots/soil)).
   There’s a setting that allows a filter that removes all absolute urls and instead
   all links inside the database don’t contain the domain. If your plugin searches
   and tries to replace for a full url with the domain, I think it could be the 
   issue.
 * On one hand, even though Soil is pretty popular, I would totally understand if
   you wouldn’t want to adapt your code to their flag for “relative-urls”. Is the
   codebase of the plugin on github? I’m going to look through the code and make
   a pull request when I have time.

Viewing 11 replies - 1 through 11 (of 11 total)