Score:0

Content Translation installation breaks the website (statistics module error + aliases not taken into account)

in flag
Dna

First, I would like to say I am a total noob in Drupal and PHP but possess some knowledge on other web frameworks/languages).

Here is my path to the errors:

I used the UI to install Content Translation and Configuration Translation modules from the multilingual core (other 2 modules were already installed).

This did not work properly as it totally broke the website:

  • aliases not respected (from "/contact" to "/node/3" for instance)
  • an error on statistics module for some pages (the most important ones of course).

Here is the error on module statistics:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mytablename.node_counter' doesn't exist: SELECT "nc"."totalcount" AS "totalcount", "nc"."daycount" AS "daycount", "nc"."timestamp" AS "timestamp" FROM {node_counter} "nc" WHERE "nid" IN (:db_condition_placeholder_0); Array ( [:db_condition_placeholder_0] => 16 ) in statistics_node_links_alter() (line 55 of /srv/mywebsitedomain/drupal/web/core/modules/statistics/statistics.module).

("mywebsitedomain" and "mytablename" are dummy names because I cannot share the website name unfortunately.)

To be fair, I do not understand why it happened as I did not dive into the code or anything else.

Did some of you had the same issue, or possess some insight about how to fix it?

I would really appreciate some help.

Thank you !

MrD avatar
cn flag
MrD
Do you try reinstall module statistics. See message error, problem from tabel node_counter does not exit. So you need to reinstall module to add table.
in flag
Dna
Thank you I will try it, however I don't want to lose data. In the UI, after selecting uninstall, it warns me that data will be lost. Can't we just reinstall it without totally uninstalling it ?
in flag
Dna
I did an uninstall (statistics are secondary at this point I just want the website to work). But now it does not seems be be able to install Statistics anymore. I check it, click on install and then the page refresh but the module is still unchecked.
in flag
Dna
Hello, just so you know, I used a backup to revert everything. That's a shame because I did not find how to solve this issue. Thank you for your help
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.