Creating and Updating Nodes Programmatically in Drupal 7Posted by peón on August 18, 2011 at 4:08pm Acabo de crear este hilo temático siguiendo las indicaciones de francort... Había instalado la versión 7.4 y actualicé ¿la base de datos? a 7.7, pero, no creo que siguiendo los pasos debidos. /watch?v=g0ewhUbJ_4s, pero, sin pasar por la versión 7.5 y cometí el mismo error que señala el video en el minuto 6:15, que fue no hacer back up de la base de datos y el sistema de archivos... Sin embargo, hasta ahí todo siguió funcionando correctamente en el sitio y dejó de funcionar bien cuando decidí agregar "Opciones de ruta URL", quitanto el "alias" por defecto, a algunas páginas de un libro, específicamente las cuatro páginas de: http://camaraciudadana.cl/node/38, y luego de haber cambiado algunas de las rutas de esas páginas y de sus páginas hijas, el sistema se comenzó a poner lento y empezó a aparecer el siguiente mensaje de error, sin permitirme acceder al sitio, pero, pasado un tiempo pedo ingresar nuevamente:
PDOException: SQLSTATE[HY000]: General error: 1030 Got error 28 from storage engine: SELECT b.*, ml.*, n.type AS type, n.title AS title FROM {book} b INNER JOIN {node} n ON b.nid = n.nid INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE (n.nid IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4)) AND (n.status = :db_condition_placeholder_5) ORDER BY ml.weight ASC, ml.link_title ASC; Array ( [:db_condition_placeholder_0] => 3 [:db_condition_placeholder_1] => 8 [:db_condition_placeholder_2] => 9 [:db_condition_placeholder_3] => 85 [:db_condition_placeholder_4] => 104 [:db_condition_placeholder_5] => 1 ) en book_get_books() (línea 371 de /home/camaraci/public_html/modules/book/book.module). Antes de aparecer ese mensaje de error, las rutas URL de las páginas de aquel libro tenían por "alias" camaraciudadana/content/ y luego venía el resto del alias, pero, ahora las rutas son del tipo camaraciudadana/nombre-significativo-de-la-pagina ...
Y eso es todo lo que podría detallar respecto del error que presenta mi sitio... Desde ya agradezco a quien me pueda indicar cómo solucionar el problema... Hasta este momento tal vez me decidiría por cambiar los alias de las rutas para que incluyesen nuevamente la palabra "content", tal como camaraciudadana/content/nombre-significativo-de-la-pagina, pero, hago la consulta del caso para tener una opinión de alguien que tenga mucho más experiencia que yo utilizando este virtuoso CMS, para no seguir embarrándola más de lo que pudiera mejorar... You must register or login in order to post into this group. Drupal North Regional Summit Drupal 8 Release Parties D8 Core Indian Language Translators Group This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:All posts: Hot content this week Who's hiring in Portland? DRUPAL MEETUP - MARZO 2017 Monthly Meeting: Using Migrate for Drupal 6 to Drupal 8 Migration March Seattle Drupal User Group Meeting
[UPDATE] – alias menu import module was rolled into “Sample Data” module that is of newer version. it is listed on Drupal site Currently, if you would like to export and import the sample data( like kickstart) via features, then the menus for your data breaks because it uses the hard coded path(i.e. node/id) and the new instance has different path for the nodes imported. To my understanding there is a work in place to fix this in future release of features by using the path uuid but of January, 2014 that is not available at least in stable version The solution presented here utilizes ‘pathauto’ and its generated alias path for each node to do the mapping between the same nodes on two different Drupal instances. In another words, we export existing menu structure with alias path as reference. Once these nodes are imported(before menu import script is run) on the another Drupal instance, it automatically generates the default alias path(for custom alias, please, section ‘If Custom Path Alias…’ below).
Since these alias path are the same between the drupal instances, the installation script looks up the mapping when structuring and building menu. To maintain the existing menu structure, you will have to run a script that will generate the structure used by the menu importer script as showed in this post. This may be improved in future but author didn’t have time at this time and may not be a value since there is path uuid project in progress that will be the better solution in long run In addition, the path for nodes has to be unique as well. The solution consists of two parts: To build current menu structure for menu of your choice run the following script in “PHP Execute” block on Drupal instance you want to export the menu from(copy/past and then specify menus to export on line 3): First copy and past the above code in to “PHP Execute” block. Second, specify the menus you like to export in the line 3 variable ‘$menus’ This script generates two arrays encapsulated in functions _menu_installed_items() and _menus_altered() that you will have to supply in your custom module installation file in next step
Create a custom block with the following .install script: Make sure you add the two functions generated in Part I (i.e._menus_altered(),_menu_installed_items() ) in the .install file where it says ‘//ADD THE TWO FUNCTIONS FROM PART I HERE’. These are used by the script to build the new menus Thats all….in future we hope to automize the above process by creating module if the problem is not solved soon by the features,uuid modules. The features module currently does not export/import path_alias for nodes. This is okey if you are using path alias of the node that were generated by default by pathauto module, however. If not, then your custom alias path for nodes are not exported/imported via features and the above menu export/import solution will not work. By enabling this module, your custom path alias is going to be exported and then imported for all nodes. Make sure all the menu items imported are pointing to path alias that are unique. If not unique, then you have to break into more than one menu import to work.