anchor.diff:  
   %% @doc Fetch the title of all things related to the resource
   related(Id, Context) ->
  -    Ids = m_edge:objects(Id, Context),
  -	Ids1 = z_notifier:foldr({pivot_related, Id}, Ids, Context),
  -    Texts = [ m_rsc:p(R, title, Context) || R <- Ids1 ],
  +    Ids = lists:usort(m_edge:objects(Id, Context)),
  +    Ids1 = z_notifier:foldr({pivot_related, Id}, Ids, Context),
  +    IdsTexts = z_notifier:foldr({pivot_related_text_ids, Id}, Ids, Context),
  +    Texts = [ m_rsc:p(R, title, Context) || R <- IdsTexts ],
       {Ids1, Texts}.
       
   
  
positive.code:     {Ids, Names}.
  
  
  fetch_texts({title, Value}, {A,B}) ->
      {[Value|A], B};
  fetch_texts({subtitle, Value}, {A,B}) ->
      {[Value|A], B};
  fetch_texts({surname, Value}, {A,B}) ->
      {[Value|A], B};
  fetch_texts({first_name, Value}, {A,B}) ->
      {[Value|A], B};
  fetch_texts({given_name, Value}, {A,B}) ->
      {[Value|A], B};
  fetch_texts({F, Value}, {A,B}) when is_binary(Value) ->
      case do_pivot_field(F) of
          false -> {A,B};
          true -> {A, [Value|B]}
      end;
  fetch_texts({F, {{Y,M,D},{H,Min,S}} = Date}, {A,B} = Acc)
      when is_integer(Y) andalso is_integer(M) andalso is_integer(D) 
          andalso is_integer(H) andalso is_integer(Min) andalso is_integer(S) ->
      case do_pivot_field(F) of
          false -> Acc;
          true -> {A, [erlydtl_dateformat:format(Date, "Y m d H i s F l h", en)|B]}
      end;
  fetch_texts({_, {trans, _} = V}, {A,B}) ->
      {A, [V|B]};
  fetch_texts({F, V}, {A,B} = Acc) ->
      case do_pivot_field(F) of
          false -> Acc;
          true ->
  
negative.code:                     ?LOG("Task failed(~p:~p): ~p:~p(~p)~n", [Error, Reason, Module, Function, Args]),
                      insert_task(Module, Function, Key, Args, Context)
              end;
          empty ->
              nop
      end,
      % Pivot some resources
      case fetch_queue(Context) of
          [] -> ok;
          Qs ->
              F = fun(Ctx) ->
                          [ pivot_resource(Id, Ctx) || {Id,_Serial} <- Qs]
                  end,
              case z_db:transaction(F, Context) of
                  {rollback, PivotError} -> ?LOG("Pivot error: ~p~n", [PivotError]);
                  L when is_list(L) -> delete_queue(Qs, Context)
              end
      end.
  
  
      %% @doc Fetch the next task uit de task queue, if any.
      poll_task(Context) ->
          case z_db:q_row("select id, module, function, key, props from pivot_task_queue order by id asc limit 1", Context) of
              {Id,Module,Function,Key,Props} ->
                  Args = case Props of
                      [{args,Args0}] -> Args0;
                      _ -> []
                  end,
                  %% @todo We delete the task right now, this needs to be changed to a deletion after the task has been running.
                  z_db:q("delete from pivot_task_queue where id = $1", [Id], Context),
                  {z_convert:to_atom(Module), z_convert:to_atom(Function), Key, Args};
              undefined ->
                  empty
          end.
      
  
  %% @doc Pivot a specific id, delete its queue record if present
  do_pivot(Id, Context) ->
  