Forum OpenACS Development: Re: Should content_item__get_id resolve the URL of the root folder id that is passed in?

Hi Dave,

I think what you propose should be correct.  We have to look for code which relies on this wrong behaviour.  Or maybe put it into the the release notes of 5.1 or something.  I also uncovered a bug on the same plsql procedure.  Where as the resolve_index_p does not function if you are on the root already.

I have not yet had time to look for apps that relies on this and fix the oracle one too.

Near the top of the function.  I copied similar code that is on the bottom.

  -- If the request path is the root, then just return the root folder
  if get_id__item_path = ''/'' then
    if get_id__resolve_index = ''t'' then

      -- if the item is a folder and has an index page, then return

      if content_folder__is_folder(v_root_folder_id) = ''t'' and
        content_folder__get_index_page(v_root_folder_id) is not null then

        v_root_folder_id := content_folder__get_index_page(v_root_folder_id);
      end if;

    end if;
    return v_root_folder_id;
  end if;