Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In views_handler_field_prepopulate_create_node_links.inc, the following code will remove the content type's machine from the beginning as well as the field name if the field name uses the content type.
For example, content_type_a uses the field field_content_type_a_name.
$to_replace = array($content_type, 'create_link');
$field_name = trim(str_replace($to_replace, '', $this->options['field']), '_');
This code removes both instances of 'content_type_a', which will prevent the following line to load the field instance b/c the field name is incorrect.
Patch to more carefully parse the field name from $this->options['field'] forthcoming.
Comment | File | Size | Author |
---|---|---|---|
#1 | prepopulate_create_node_links-parse-field-name-2448239-1.patch | 860 bytes | jasonawant |
Comments
Comment #1
jasonawantHere's a patch for review.