NEUBIAS / bise

BIII development repository
http://biii.eu
GNU General Public License v2.0
5 stars 14 forks source link

comment body does not appear #171

Closed miura closed 1 year ago

miura commented 4 years ago

Comment subject appears but the body text is hidden.

image

miura commented 4 years ago

I briefly checked the database and the contents I test posted is present, so somewhere in the piping is not working...

image

miura commented 4 years ago

I tried adding a new twig file and fix but so far (see below), I found that {{content}} token that pipes comment body text into the node is completely empty (even though we have those text in the database). It seems to be that fixing this is not that trivial.

Currently, I am using the twig file name web/themes/custom/projet/templates/comment--field-give-feedback-on-this-soft--software.html.twig

<article{{ attributes.addClass('js-comment') }}>
  {#
    Hide the "new" indicator by default, let a piece of JavaScript ask the
    server which comments are new for the user. Rendering the final "new"
    indicator here would break the render cache.
  #}
  <mark class="hidden" data-comment-timestamp="{{ new_indicator_timestamp }}"></mark>

  <footer>
    {{ user_picture }}
    <p>{{ submitted }}</p>

    {#
      Indicate the semantic relationship between parent and child comments for
      accessibility. The list is difficult to navigate in a screen reader
      without this information.
    #}
    {% if parent %}
      <p class="visually-hidden">{{ parent }}</p>
    {% endif %}
    {{ permalink }}
  </footer>
  <div{{ content_attributes }}>
    {% if title %}
      {{ title_prefix }}
      <h3{{ title_attributes }}>{{ title }}</h3>
      {{ title_suffix }}
    {% endif %}
    {{ content }}
  </div>

</article>
miura commented 4 years ago

It seems that many comments are lost from the database at some point and inconsistency between three tables in the database used for comment data. I will try to look back available database backups to find out when this happened. comment body text is there, but the keys for associating these body text to specific nodes are missing.

mysql> select count(*) from comment__comment_body
    -> ;
+----------+
| count(*) |
+----------+
|      411 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from comment_field_data;
+----------+
| count(*) |
+----------+
|       46 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from comment;
+----------+
| count(*) |
+----------+
|       46 |
+----------+
1 row in set (0.00 sec)
miura commented 1 year ago

all comments cleared (comment data broken with access), and it should be functioning again.