update

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3-access settings' for key 'PRIMARY'

  1. Drupal 6 to 7 upgrade with #drush site-upgrade --core-only --replace @onward
  2. Fails with the following, and I have no idea how to track it down further or what's causing it?
  3.  
  4. user module:
  5. ......

Fix for When I try to upload a module this is what appears

  1.     * Unable to retrieve Drupal project from http://ftp.drupal.org/files/projects/wysiwyg-7.x-2.1.tar.gz.

When I try to upload a module this is what appears

  1.     * Warning: fileowner() [function.fileowner]: stat failed for temporary://update_patSeE in update_manager_local_transfers_allowed() (line 924 of /home/kiyf0/public_html/modules/update/update.manage
sepehr's picture

Fix for Fix for Updating a nodereference CCK field using node_save()

  1. ...
  2. // Getting current reference delta.
  3. $current_delta = db_query("SELECT delta FROM {content_field_movie_node_ref}
  4.                           WHERE vid = '%d'
  5.                           ORDER BY delta DESC
  6.                           LIMIT 1", $existing_movie-
sepehr's picture

Fix for Updating a nodereference CCK field using node_save()

  1. ...
  2. // Getting current reference delta.
  3. $current_delta = db_query("SELECT delta FROM {content_field_movie_node_ref}
  4.                           WHERE vid = '%d'
  5.                           ORDER BY delta DESC
  6.                           LIMIT 1", $existing_movie-
sepehr's picture

Updating a nodereference CCK field using node_save()

  1. ...
  2. // Getting movie node.
  3. $existing_movie_node = node_load($existing_movie->nid);
  4.                                        
  5. // "Appending" a node reference.
  6. $existing_movie_node->field_movie_node_ref[]['nid'] = $drupal_subtitle_no

Fix for TestCase not listed

  1. Alter simpletest.info and add dependency to update.test
  2. <?php
  3. files[] = tests/update.test
  4. ?>

TestCase not listed

  1. <?php
  2. // $Id$
  3.  
  4. /**
  5.  * @file
  6.  * Tests for update.inc.
  7.  */
  8.  
  9. /**
  10.  * Unit tests for the module API.
  11.  */
  12. class UpdateIncTestCase extends DrupalWebTestCase {
  13.   public static function getInfo() {

Update function

  1. function blah_migration_update_6000(&$sandbox) {
  2.   $ret = array();
  3.  
  4.   module_load_include('inc', 'install_profile_api', 'core/menu');
  5.  
Syndicate content