Problem/Motivation

We have experienced sporadic broken page (site) issues after upgrading from 9.3.2 to 9.3.3. The site will show a blank page with the following error message:

The website encountered an unexpected error. Try again later.
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "`" LINE 1: CREATE TABLE IF NOT EXISTS `cleantalk_sfw` (`id` INT NOT NUL... ^: CREATE TABLE IF NOT EXISTS `cleantalk_sfw` (`id` INT NOT NULL AUTO_INCREMENT, `network` INT unsigned NOT NULL, `mask` INT unsigned NOT NULL, `status` TINYINT NOT NULL DEFAULT 0, `source` TINYINT NULL DEFAULT NULL, PRIMARY KEY (`id`), INDEX ( `network` , `mask` )); Array ( ) in Cleantalk\Custom\Db\Db->execute() (line 47 of modules/contrib/cleantalk/lib/Cleantalk/Custom/Db/Db.php).

Steps to reproduce

The issue seems to happen randomly. The web site usually comes back after a page reload but will happen again at a later time.

Issue fork cleantalk-3440073

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    Comments

    chunhuaicheng created an issue. See original summary.

    znaeff’s picture

    Hello @chunhuaicheng,

    Thank you for the information.

    I've passed your details to the programmer staff.

    We will write back to you within 3 business days when we get any results.

    Please wait.

    rishabjasrotia’s picture

    Hello @chunhuaicheng

    It seems to be issue with postgresql database syntax error.
    It works fine with MariaDB & MySQL.

    znaeff’s picture

    Hello @chunhuaicheng,
    Thank you for waiting.

    Since you are using PostgreSQL, you need to use this version:
    https://www.drupal.org/files/issues/2023-03-29/cleantalk%2Bpgsql_0.zip

    Did it help?

    chunhuaicheng’s picture

    Yes, we're using PostgreSQL and yes, it seems to help.

    But we're using composer to manage the packages. Now I just swapped out cleantalk from the 'module/contrib' folder with this postgres version. This will get overwritten every time we update Drupal, won't it? Is there a better solution?

    znaeff’s picture

    Hello @chunhuaicheng,

    We plan to merge the branch that supports this base and release a new version. The deadline is mid-May.

    We'll let you know when we're done.

    znaeff’s picture

    Hello @chunhuaicheng
    We have released the new version: https://www.drupal.org/project/cleantalk/releases/9.4.0

    chunhuaicheng’s picture

    StatusFileSize
    new85.7 KB

    Hi,

    I just updated my Drupal site to 10.3.2 which has this 9.4.0 version of CleanTalk. However, I'm encountering this new error that breaks my site.

    screenshot

    znaeff’s picture

    Hello @chunhuaicheng,

    Could you please reinstall our plugin and recheck this issue?

    Please let us know about the results.

    chunhuaicheng’s picture

    StatusFileSize
    new124.08 KB

    Hi,

    I just uninstalled and then reinstalled it from the web UI and repopulate our access key in the settings (i.e. /admin/config/cleantalk/cleantalk_settings_form). It was the same. It didn't happen at first but after I navigated around the site, some of the pages (e.g. /node/89, /user) was broken with the error message I attached here.

    znaeff’s picture

    Thank you for the details.

    Can you reach out to our support team so we can gather some more information from you concerning this issue? Please, create a private ticket:
    https://cleantalk.org/my/support/open