I'm working on a site that is using the FAQ Field module and we are looking to migrate the content to another Drupal 7 instance.

When I am creating the mappings for my import feed, the field made of the FAQ Field instance does not show up in the Target drop down list. This is because there is no FAQ Field mapper file to define the field type in /sites/all/modules/feeds/mappers.

I have created this mapper and tested it just enough to have it work on my environment. I'd like to present it here for review, testing, tweaking and what-not.

Files: 
CommentFileSizeAuthor
#3 feeds_importing-content-from-faqfield_2053733-3.patch2.76 KBkarenann
PASSED: [[SimpleTest]]: [MySQL] 4,505 pass(es).
[ View ]
#2 feeds_importing-content-from-faqfield_2053733-2.patch2.67 KBkarenann
PASSED: [[SimpleTest]]: [MySQL] 4,509 pass(es).
[ View ]
#1 feeds_importing-content-from-faqfield_2053733-1.patch2.73 KBkarenann
PASSED: [[SimpleTest]]: [MySQL] 4,503 pass(es).
[ View ]

Comments

karenann’s picture

Status:Active» Needs review
StatusFileSize
new2.73 KB
PASSED: [[SimpleTest]]: [MySQL] 4,503 pass(es).
[ View ]

I'm not sure if I did this right, so I'd love some feedback.

Important Notes:

  • I am exporting the faqfield data through Views Data Export into a CSV file.
  • The exporting view is set to output the faqfield data in the format of Simple Text (themeable)
  • The exporting view uses the FAQ Fields default format of theme_faqfield_formatter
      function theme_faqfield_formatter($variables) {
        $output = '<h3 class="faqfield-question">' . $variables['question'] . '</h3>';
        $output .= '<div class="faqfield-answer">' . $variables['answer'] . '</div>';
        return $output;
      }
     
  • The exporting view is set to display multiple fields inline and I have the separator set to --break--
  • The import uses Feeds Tamper to "Explode" on the --break-- separator
karenann’s picture

StatusFileSize
new2.67 KB
PASSED: [[SimpleTest]]: [MySQL] 4,509 pass(es).
[ View ]

I realized that I had a few errors. Please review this instead. Changes include:

~ changed split to explode
~ removed trailing line breaks
~ replace tabs with spaces

karenann’s picture

StatusFileSize
new2.76 KB
PASSED: [[SimpleTest]]: [MySQL] 4,505 pass(es).
[ View ]

Another issue resolved:

~ added a continue in the event that the faqfield is blank.