Jake Vanderwerf
2026-01-07 bad59c66549eb601fed963ed013f9b79305ca003
inc/rest/routes/ContentRoutes.php
@@ -36,7 +36,7 @@
    {
        $this->cache_name = 'user_content_'.get_current_user_id();
        parent::__construct();
      $this->cache->clear();
        $this->action = 'dash-';
        $this->operation_type = 'content_update';
        add_filter(BASE.'handle_bulk_operation', [$this, 'processOperation'], 10, 3);
@@ -369,7 +369,20 @@
        foreach ($posts as $ID => $post_data) {
         if (Features::forContent($post_data['content'])->has('is_timeline') && array_key_exists('timeline', $post_data)) {
            $results[$ID] =$this->processTimelinePost($ID, $post_data);
            // Handle timeline posts - ensure we have a valid integer ID
            $parent_id = (int)$ID;
            // Skip if ID is invalid (0, 'null', etc would become 0)
            if ($parent_id === 0) {
               error_log('Invalid timeline parent ID: ' . $ID);
               $results[$ID] = [
                  'success' => false,
                  'message' => 'Invalid parent post ID for timeline'
               ];
               continue;
            }
            $results[$ID] = $this->processTimelinePost($parent_id, $post_data);
            continue;
         }
         if (str_starts_with($ID, 'new')) {