• PHP Fatal error: Uncaught Error: Class “RockLobsterInc\Swv\CompositeRule” not found in /home/[…]/public_html/wp-content/plugins/contact-form-7/includes/swv/swv.php:129

Viewing 6 replies - 1 through 6 (of 6 total)
  • I got the same issue. While waiting for a fix from the developer, try changing this in /load.php

    require_once 'vendor/autoload.php';

    to

    require_once WPCF7_PLUGIN_DIR . '/vendor/autoload.php';

    That way, CF7 will only use its own vendor folder and not any other such folder. In my case the site ran fine, but when running WP CLI from the project root, the wrong autoload.php was used by CF7 which caused the error.

    Thread Starter saramon

    (@saramon)

    Yes, can confirm. The issue only happens on sites that already have a vendor folder. On all the others, the update went smoothly.

    If you are referring to line 5 of load.php, that is

    require 'vendor/autoload.php'

    not

    require_once 'vendor/autoload.php'

    To clarify then, @folbert , are you recommending that line 5 is changed to:

    require_once WPCF7_PLUGIN_DIR . '/vendor/autoload.php'

    ?

    • This reply was modified 1 day, 21 hours ago by MC3.

    What seems to work for me is to edit line 5 of load.php to read:

    require WPCF7_PLUGINDIR . '/vendor/autoload.php'

    @mc3 My bad, the original line is require ...

    FWIW, it shouldn’t matter if you use require or require_once in this case.

    • This reply was modified 1 day, 19 hours ago by folbert.
    • This reply was modified 1 day, 19 hours ago by folbert.

    @folbert solution works, thanks

    Hope the fix will be released soon

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

You must be logged in to reply to this topic.