Support » Plugin: The GDPR Framework By Data443 » There is a bug with your Flamingo integration, here’s the fix

  • Resolved steve-pheriche



    Your flamingo integration has an issue as it only checks the first 10 messages because of how you have constructed your parameters for the request.

    I can illustrate it and suggest the fix.


    • Send 12 messages to yourself via CF7, make each mail address different. So, (…)
    • In Wp_Admin visit Tools->Data443 and go to the tab “Data Subjects” and search for the data subject you should see an entry because this was in the first page of results.
    • Now, a negative. In the tab “Data Subjects” search for the data subject you will very likely see Result: No data found! because entry 12 is not searched

    What is happening here is In gdpr-framework\src\Modules\ContactForm7\Flamingo.php there is a call on

      $messages = \Flamingo_Inbound_Message::find([
                   'channel' => get_post_field( 'post_name', $form->id()),

    if you do a count() on $messages

    echo('<pre>COUNT '); print_r(count($messages));echo('<pre>');
    You’ll see that it reads “COUNT: 10” rather than 12.

    In the source class

    We can see the parameters for the query are paged.

    	$defaults = array(
    			<strong>'posts_per_page' => 10,</strong>
    			'offset' => 0,
    			'orderby' => 'ID',
    			'order' => 'ASC',
    			'meta_key' => '',
    			'meta_value' => '',
    			'post_status' => 'any',
    			'tax_query' => array(),
    			'channel' => '',
    			'channel_id' => 0,

    To get my site working I have brutally forked GDPR Framework with a posts_per_page=-1

      $messages = \Flamingo_Inbound_Message::find([
                'posts_per_page' => -1,
                   'channel' => get_post_field( 'post_name', $form->id()),

    Which now returns me the correct count($messages)
    COUNT 719

    Naturally, this is memory intensive and I suggest Data443 should perhaps do a loop until on this match attempt. For me, for now I’ve got to deliver so I can invoice, so brutal will have to do 😉

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.