Comments

sun’s picture

StatusFileSize
new7.02 KB

Adding proper Field API support is left for #791792: Comment form doesn't support fields

dries’s picture

Status: Needs review » Fixed

Looks good. Committed to CVS HEAD. Thanks.

sun’s picture

Title: Update for changed Comment form ids » Upgrade path for changed Comment form ids
Status: Fixed » Active

Sorry, I forgot that we need a module update, too.

sun’s picture

Priority: Critical » Normal
Status: Active » Needs review
StatusFileSize
new1.67 KB

This should cut it. Not tested yet.

sun’s picture

+++ mollom.install	12 Sep 2010 19:02:50 -0000
@@ -536,3 +536,41 @@ function mollom_update_7005() {
+  // @todo Remove after http://drupal.org/node/898520 landed.
+  if (function_exists('_update_7000_node_get_types')) {
+    $types = _update_7000_node_get_types();
+  }
+  else {
+    $types = db_query('SELECT * FROM {node_type}')->fetchAllAssoc('type', PDO::FETCH_OBJ);
+  }

chx told me that those update helper functions may vanish at some point. So we're better off with the manual query. Also, we just need the {node_type}.type, nothing else.

+++ mollom.install	12 Sep 2010 19:02:50 -0000
@@ -536,3 +536,41 @@ function mollom_update_7005() {
+  // @todo Do we also have to update Mollom data in {mollom}?

This @todo mainly targets #909484: Add {mollom}.form_id and store originating form_id for session values -- not sure why we didn't store the form_id in the first place, since lots of code in Mollom module can be simplified with that info.

Powered by Dreditor.

sun’s picture

Status: Needs review » Needs work
+++ mollom.install	12 Sep 2010 19:02:50 -0000
@@ -536,3 +536,41 @@ function mollom_update_7005() {
+  // Using db_merge() instead of db_insert() to account for manually performed
+  // updates or re-configuration.

db_merge() is actually not what we want. In case the new row already exists, we don't want to touch it.

Powered by Dreditor.

sun’s picture

And we should also delete the 'comment_form' row at the end. Thanks, Dries! :)

pwolanin’s picture

Status: Needs work » Needs review
StatusFileSize
new1.87 KB

Updated the patch per comments above.

Quick local testing with faked up SQL rows looks ok.

sun’s picture

Status: Needs review » Fixed

Thanks for reporting, reviewing, and testing! Committed to HEAD.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit b351a6e on master, fai6, 8.x-2.x, fbajs, actions by sun:
    #908316 by sun, pwolanin, Dries: Updated for changed Comment form ids.
    
    
  • Commit d1794c9 on master, fai6, 8.x-2.x, fbajs, actions by Dries:
    - Patch #908316 by sun: update for changed Comment form ids.
    
    

  • Commit b351a6e on master, fai6, 8.x-2.x, fbajs, actions by sun:
    #908316 by sun, pwolanin, Dries: Updated for changed Comment form ids.
    
    
  • Commit d1794c9 on master, fai6, 8.x-2.x, fbajs, actions by Dries:
    - Patch #908316 by sun: update for changed Comment form ids.