Title: Error when saving/creating content blocker
Last modified: June 28, 2023

---

# Error when saving/creating content blocker

 *  Resolved [strarsis](https://wordpress.org/support/users/strarsis/)
 * (@strarsis)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/error-when-saving-creating-content-blocker/)
 * When saving/creating a Content Blocker, the following error occurs: `Uncaught
   Error: Class "DevOwl\RealCookieBanner\lite\settings\TcfVendorConfiguration" not
   found in [...]/plugins/real-cookie-banner/inc/comp/language/Hooks.php:228`
 * Another symptom is that when trying to save an existing Service (that is used
   by that Content Blocker by the way, this error occurs): `Could not update the
   meta value of technicalDefinitions in database`
 * Latest WordPress (`6.2.2`) and the Real Cookie Banner plugin (`3.7.2`) are used.

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

 *  Plugin Contributor [Matthias Günter](https://wordpress.org/support/users/mguenter/)
 * (@mguenter)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/error-when-saving-creating-content-blocker/#post-16856555)
 * Hey [@strarsis](https://wordpress.org/support/users/strarsis/) !
 * Are you using the PRO version of Real Cookie Banner?
 *  Thread Starter [strarsis](https://wordpress.org/support/users/strarsis/)
 * (@strarsis)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/error-when-saving-creating-content-blocker/#post-16856789)
 * Hi Matthias,
 * This issue occurs in the free version.
 *  Thread Starter [strarsis](https://wordpress.org/support/users/strarsis/)
 * (@strarsis)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/error-when-saving-creating-content-blocker/#post-16859236)
 * [@mguenter](https://wordpress.org/support/users/mguenter/): Is there a way to
   find out why exactly saving the settings fails?
   Are there diagnostics information
   that I can post here?
 *  Plugin Contributor [Matthias Günter](https://wordpress.org/support/users/mguenter/)
 * (@mguenter)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/error-when-saving-creating-content-blocker/#post-16859788)
 * Hi [@strarsis](https://wordpress.org/support/users/strarsis/) !
 * No, there are no other diagnostics information. If you haven’t set up too much
   yet, would it be possible to test resetting the plugin under Cookies > Settings
   > “Reset”?
 *  Thread Starter [strarsis](https://wordpress.org/support/users/strarsis/)
 * (@strarsis)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/error-when-saving-creating-content-blocker/#post-16861009)
 * [@mguenter](https://wordpress.org/support/users/mguenter/): I reset everything,
   but the error re-occurs when saving a new service.
 *  Thread Starter [strarsis](https://wordpress.org/support/users/strarsis/)
 * (@strarsis)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/error-when-saving-creating-content-blocker/#post-16861051)
 * [@mguenter](https://wordpress.org/support/users/mguenter/): So I think I found
   the reason, accidentally `90` years instead of days was set. However, although
   this may be very rare, it should not cause the save process to crash. I guess
   the duration is converted to a number (e.g. seconds) and `90` years would result
   in a number that is too large for the variable/field to hold.
 * Edit: I also had to remove and re-add some cookies to make saving the service
   work again.
    -  This reply was modified 2 years, 11 months ago by [strarsis](https://wordpress.org/support/users/strarsis/).
 *  Thread Starter [strarsis](https://wordpress.org/support/users/strarsis/)
 * (@strarsis)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/error-when-saving-creating-content-blocker/#post-16861797)
 * [@mguenter](https://wordpress.org/support/users/mguenter/): After some further
   investigation it appears clear that indeed the `TcfVendorConfiguration` class
   is **simply missing from the plugin files**.
 * I can find class files for the namespace `DevOwl\RealCookieBanner\lite\settings`,
   but `TcfVendorConfiguration` is not among them. I grepped the whole plugin directory,
   after plugin installation and setup (in case the plugin downloads those files
   somehow), and **nothing** came up as a class definition.
 * In the aforementioned `Hooks.php`:
 *     ```wp-block-code
       $postType = $meta_key === Blocker::META_NAME_SERVICES ? Cookie::CPT_NAME : TcfVendorConfiguration::CPT_NAME;
       ```
   
 * When `$meta_key` is something else than the service group, e.g. “Statistics”,
   the custom post type name is retrieved from the constant `CPT_NAME` of the `TcfVendorConfiguration`
   class. That `TcfVendorConfiguration` class does not exist in the plugin directory,
   nor in any files of the whole WordPress site.
 * What surprises me is that the TCF feature is used at all in the free variant 
   of the plugin, as TCF is only available in the PRO variant and should always 
   be disabled anyway.
 * This is the (redacted) JavaScript equivalent fetch request the client side does:
 *     ```wp-block-code
       fetch("https://example-site.localhost/wp-json/wp/v2/rcb-blocker?_method=POST&_v=3.7.2&_locale=user&_dataLocale=de", {
       "headers": {
       "accept": "application/json, /;q=0.1",
       "accept-language": "de,en;q=0.9,en-US;q=0.8",
       "cache-control": "no-cache",
       "content-type": "application/json;charset=utf-8",
       "pragma": "no-cache",
       "sec-ch-ua": "\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Google Chrome\";v=\"114\"",
       "sec-ch-ua-mobile": "?0",
       "sec-ch-ua-platform": "\"Windows\"",
       "sec-fetch-dest": "empty",
       "sec-fetch-mode": "cors",
       "sec-fetch-site": "same-origin",
       "x-wp-nonce": "cc5b2a2ec1"
       },
       "referrer": "https://example-site.localhost/wp/wp-admin/admin.php?page=real-cookie-banner-component",
       "referrerPolicy": "strict-origin-when-cross-origin",
       "body": "{\"title\":\"Test 2\",\"content\":\"Test 2\",\"status\":\"publish\",\"meta\":{\"rules\":\"Test 2\",\"criteria\":\"services\",\"services\":\"5904\",\"isVisual\":false,\"visualMediaThumbnail\":0,\"tcfVendors\":\"\"}}",
       "method": "POST",
       "mode": "cors",
       "credentials": "include"
       });
       ```
   
 * When I strip the `tcfVendors` field from the JSON payload (body), the request
   works fine and the content blocker is saved correctly (with a service linked 
   to it). The mere presence of that `tcfVendors` field, even just holding an empty
   string, causes this issue.
 * When those services were saved with an error, they are not listed, but still 
   counted in the Cookie Banner dashboard, they are stored incompletely in the database.
    -  This reply was modified 2 years, 11 months ago by [strarsis](https://wordpress.org/support/users/strarsis/).
    -  This reply was modified 2 years, 11 months ago by [strarsis](https://wordpress.org/support/users/strarsis/).
    -  This reply was modified 2 years, 11 months ago by [strarsis](https://wordpress.org/support/users/strarsis/).
    -  This reply was modified 2 years, 11 months ago by [strarsis](https://wordpress.org/support/users/strarsis/).
    -  This reply was modified 2 years, 11 months ago by [strarsis](https://wordpress.org/support/users/strarsis/).
    -  This reply was modified 2 years, 11 months ago by [strarsis](https://wordpress.org/support/users/strarsis/).
    -  This reply was modified 2 years, 11 months ago by [strarsis](https://wordpress.org/support/users/strarsis/).
    -  This reply was modified 2 years, 11 months ago by [strarsis](https://wordpress.org/support/users/strarsis/).
    -  This reply was modified 2 years, 11 months ago by [strarsis](https://wordpress.org/support/users/strarsis/).
    -  This reply was modified 2 years, 11 months ago by [strarsis](https://wordpress.org/support/users/strarsis/).
    -  This reply was modified 2 years, 11 months ago by [strarsis](https://wordpress.org/support/users/strarsis/).
    -  This reply was modified 2 years, 11 months ago by [strarsis](https://wordpress.org/support/users/strarsis/).
 *  Plugin Contributor [Matthias Günter](https://wordpress.org/support/users/mguenter/)
 * (@mguenter)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/error-when-saving-creating-content-blocker/#post-16864728)
 * Hey [@strarsis](https://wordpress.org/support/users/strarsis/) !
 * > Uncaught Error: Class “DevOwl\RealCookieBanner\lite\settings\TcfVendorConfiguration”
   > not found in […]/plugins/real-cookie-banner/inc/comp/language/Hooks.php:228
 * Attached, you will find a pre-release of the plugin. This solves the problem 
   you mentioned. You can simply upload this version to your WordPress and replace
   it with the current version (Plugins > Add new > Upload Plugin; [Screenshot](https://i.imgur.com/MsiaDId.png)).
   When the next version of the plugin incl. the pre-released feature is available
   for all users, you will see it as a normal update in your WordPress.
 * Download pre-release: https://storage-dev-1.owlsrv.de/prereleases/b6a0a0d7-db5d-
   4b30-a3c5-812ffc0f0cb9/real-cookie-banner-3.8.0-5627-plugin.zip
 * > Could not update the meta value of technicalDefinitions in database
 * Unfortunately, I cannot reproduce the issue on my end. Can you please check if
   you can reproduce the issue on a plain WordPress installation?
 *  Thread Starter [strarsis](https://wordpress.org/support/users/strarsis/)
 * (@strarsis)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/error-when-saving-creating-content-blocker/#post-16866319)
 * Hi Matthias,
 * thanks for the patch! Indeed, after installing the patch, the content blocker
   can be created/updated without an error.
 * The service that previously also failed updating (failed with an error) still
   failed updating – but creating it anew works fine.
 * Concerning the issue with non-listed “zombie” services and content blockers: 
   I will try to create a reproducible example with steps. It appears that on update/
   creation errors a part of the service or content blocker was not saved in database,
   it is still listed in the Dashboard, but not in the edit lists.
    -  This reply was modified 2 years, 11 months ago by [strarsis](https://wordpress.org/support/users/strarsis/).
 *  Plugin Contributor [Matthias Günter](https://wordpress.org/support/users/mguenter/)
 * (@mguenter)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/error-when-saving-creating-content-blocker/#post-16868002)
 * Hi again [@strarsis](https://wordpress.org/support/users/strarsis/) !
 * > The service that previously also failed updating (failed with an error) still
   > failed updating – but creating it anew works fine.
   > Concerning the issue with non-listed “zombie” services and content blockers:
   > I will try to create a reproducible example with steps. It appears that on 
   > update/creation errors a part of the service or content blocker was not saved
   > in database, it is still listed in the Dashboard, but not in the edit lists.
 * Ok, I will close this ticket for now. Feel free to reopen or respond to it when
   you have a reproducible example. 🙂
 *  Thread Starter [strarsis](https://wordpress.org/support/users/strarsis/)
 * (@strarsis)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/error-when-saving-creating-content-blocker/#post-16870843)
 * [@mguenter](https://wordpress.org/support/users/mguenter/): When would be the
   next stable release, that would include this fix?
 *  Plugin Contributor [Matthias Günter](https://wordpress.org/support/users/mguenter/)
 * (@mguenter)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/error-when-saving-creating-content-blocker/#post-16870887)
 * Hey [@strarsis](https://wordpress.org/support/users/strarsis/) !
 * What fix do you mean exactly?
 *  Thread Starter [strarsis](https://wordpress.org/support/users/strarsis/)
 * (@strarsis)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/error-when-saving-creating-content-blocker/#post-16871145)
 * [@mguenter](https://wordpress.org/support/users/mguenter/): I mean the pre-release
   which works without issues. When would it become a new, stable release?
 *  Plugin Contributor [Matthias Günter](https://wordpress.org/support/users/mguenter/)
 * (@mguenter)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/error-when-saving-creating-content-blocker/#post-16877311)
 * We released it yesterday, v3.8.0. 🙂

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

The topic ‘Error when saving/creating content blocker’ is closed to new replies.

 * ![](https://ps.w.org/real-cookie-banner/assets/icon-256x256.png?rev=2419813)
 * [Real Cookie Banner: GDPR & ePrivacy Cookie Consent](https://wordpress.org/plugins/real-cookie-banner/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/real-cookie-banner/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/real-cookie-banner/)
 * [Active Topics](https://wordpress.org/support/plugin/real-cookie-banner/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/real-cookie-banner/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/real-cookie-banner/reviews/)

## Tags

 * [class](https://wordpress.org/support/topic-tag/class/)
 * [creating](https://wordpress.org/support/topic-tag/creating/)
 * [not-found](https://wordpress.org/support/topic-tag/not-found/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [Saving](https://wordpress.org/support/topic-tag/saving/)
 * [Service](https://wordpress.org/support/topic-tag/service/)
 * [uncaught error](https://wordpress.org/support/topic-tag/uncaught-error/)
 * [update](https://wordpress.org/support/topic-tag/update/)
 * [value](https://wordpress.org/support/topic-tag/value/)

 * 14 replies
 * 2 participants
 * Last reply from: [Matthias Günter](https://wordpress.org/support/users/mguenter/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/error-when-saving-creating-content-blocker/#post-16877311)
 * Status: resolved