Updated: Comment #0

Problem/Motivation

We should use yml files so the uuid is consistent

Proposed resolution

Make yml files for comment and taxonomy term fields and instances used by forum module

Remaining tasks

Patch
Review

User interface changes

None

API changes

None

Follow-up from #2077435: Use a yml file to create the forum vocabulary.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

larowlan’s picture

Assigned: Unassigned » larowlan

Working on this

andypost’s picture

RainbowArray’s picture

Assigned: larowlan » RainbowArray
RainbowArray’s picture

Status: Active » Needs review
FileSize
12.02 KB

Worked on this patch with larowlan's guidance. It doesn't get us all the way there due to the following issues:

https://drupal.org/node/2030073

https://drupal.org/node/2080823

Or at least that's part of the issue. The config files aren't loading in the correct order. They're loading by alpha order rather than by dependency.

Manually doing an entity load on the field was still leading to the same error when running the DBlog test, where on creating a forum topic, the forums select list is empty.

So this is a start. More work needed!

Status: Needs review » Needs work

The last submitted patch, forum-install-config-2106243-4.patch, failed testing.

larowlan’s picture

Status: Needs work » Needs review
FileSize
12.27 KB
1.47 KB

This includes #2077435: Use a yml file to create the forum vocabulary so should be postponed on that (but want a test run first).

larowlan’s picture

mmm green

larowlan’s picture

Status: Needs review » Postponed
larowlan’s picture

Status: Postponed » Active
Issue tags: +Needs reroll
jibran’s picture

Status: Active » Needs review
Issue tags: -Needs reroll
FileSize
3.47 KB
10.71 KB

Interdiff contains manual changes in core/modules/forum/forum.install.

larowlan’s picture

Status: Needs review » Reviewed & tested by the community

yay forum_install() looks so. much. cleaner.

andypost’s picture

The approach with comment body field is not working so I changed the field to forum_comment_body - I think it makes sense to store comment body for forum content in separate table
Also added uuid for 'General discussion' forum to disallow duplicate creation when module re-installed

EDIT related
#1969800: Add UUIDs to default configuration
#2106459: Core config has everything as string

larowlan’s picture

Status: Reviewed & tested by the community » Needs review
+++ b/core/modules/forum/forum.install
@@ -19,15 +19,19 @@ function forum_install() {
+      'uuid' => 'f7247c00-318d-11e3-aa6e-0800200c9a66',

Oh nice! I thought of this then thought it wasn't possible to specify a uuid. This is awesome, especially for deployability.

+++ b/core/modules/forum/config/field.field.comment.forum_comment_body.yml
@@ -1,8 +1,8 @@
+id: comment.forum_comment_body

There are several places in core that specify ->comment_body. For example:

  • rdf.module
  • standard profile's comment rdf mapping
  • recent comments view
  • comment tokens
  • comment admin page (although this is wrapped in a check to see if it exists first so irrelevant and only used for the truncated title attribute)

When you say 'The approach with comment body field is not working' can you specify why/where?

andypost’s picture

'The approach with comment body field is not working' can you specify why/where?

there's some reasons:
1) I got failure twice when installed forum module with error that instance can't be created without field (field is deleted when last instance removed - remove article content and then try to install forum)

2) performance - having separate table for body makes queries faster
3) deployment of separate table seems more useful

suppose it's easy to fix rdf and other tests

larowlan’s picture

I guess the other option is to check for the field in forum module preinstall?

larowlan’s picture

I guess the other option is to check for the field in forum module preinstall?

larowlan’s picture

Can #1426804: Allow field storages to be persisted when they have no fields. help here?
If they comment body field can't be removed (even if no instances) then the problem goes away yeah?

andypost’s picture

Issue tags: +Entity Field API

@larpwlan all your point are valid. But I still think that better to have separate fields for forum

Berdir’s picture

Status: Needs review » Needs work

The last submitted patch, 12: drupal8.forum-module.2106243-11.patch, failed testing.

larowlan’s picture

Issue summary: View changes
Status: Needs work » Closed (duplicate)

Fixed by other CMI issues