• Resolved Sany

    (@sannny)


    Hello,

    I have a really strange bug ??

    There are custom post types and custom post status in my blog. In my functions.php I’m using the following filters for indexing custom post status:

    
    function relevanssi_add_status($status_array) {
    
      $status_array[] = "prepublish";
      $status_array[] = "archive";
    	
      return $status_array;
    }
    add_filter('relevanssi_valid_status', 'relevanssi_add_status');
    add_filter('relevanssi_valid_admin_status', 'relevanssi_add_status');
    
    function relevanssi_allow_custom_status($post_ok, $post_id) {
    
      $status = relevanssi_get_post_status($post_id);
    	
      if($status == 'prepublish' || $status == 'archive') { 
        $post_ok = true; 
      }
      
      return $post_ok;
    }
    add_filter('relevanssi_post_ok', 'relevanssi_allow_custom_status', 11, 2);

    Yesterday, I’ve updated the PHP version from 5.4 to 7.1.7. Now, when I import big data ( > 2.000 posts, post type “product”, post status “archive”), I get server error 500. First, I thought it must be something in php.ini file; I tried to increase some values for memory_limit, max_execution_time, post_max_size and upload_max_filesize but nothing changed.
    I also tried different themes and deactivating plugins – same behaviour.
    For importing, I use WP Re-Importer plugin. I also tried to import with WP Importer and WP All Import – same behaviour.

    When I deactivate Relevanssi the import is working. When Relevanssi is activated and I outcomment the status who is used in the import file $status_array[] = "archive"; the import is working fine too (or when I switch back to PHP 5.4). Otherwise the import is failing with the server error 500.

    I’m running out of ideas – do you have any idea?

    Best regards
    saNNNy

    • This topic was modified 7 years, 8 months ago by Sany.
    • This topic was modified 7 years, 8 months ago by Sany.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Sany

    (@sannny)

    Fyi: I replaced the status “archiv” with “publish” in the xml-file (and in a second try post type “product” with “post” – if this makes sense) and the import also leads to the server error.

    Thread Starter Sany

    (@sannny)

    Update 3: I also get the internal server error 500 when I (re)build index.

    Plugin Author Mikko Saari

    (@msaari)

    For starters, custom post status is something that generally is a bit flaky in WordPress – I think that feature is still pretty far from being really usable.

    Server error 500 doesn’t tell much, but can you take a look at the server PHP error log? You might find a useful error message there.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Import error with indexed custom status’ is closed to new replies.