Because now the API can not find and return the folder_id of a folder inside a parent directory using its name. Since ajax_ui creates its own unique name hidden from the user.
Furthermore, to answer hamilton's question...
if we create a folder and then rename it, the cr_item.name remains the same with the first name instead of the new one.
Hamilton is correct we could do the same as in the new subsite ad_form with pretty_name,name and url
I am using fs::get_folder to validate if there is already a folder using that name. if so bring me its id because i am gonna use it
set package_id [ad_conn package_id]
set root_folder_id [fs_get_root_folder -package_id $package_id]
set parent_id [fs::get_folder -name "contatos" -parent_id $root_folder_id]
#if exists no folders as party_id
set folder__id [fs::get_folder -name "$party_id" -parent_id $parent_id]
if {![exists_and_not_null folder_id]} {
[fs::new_folder -name $party_id -pretty_name $party_id -parent_id $parent_id -creation_user $party_id]
}
So, this is a particular issue i had. I don't know what is the best to do and what this fixing implies along the cr_item table and relations.
Or even if it is very relevant except for my situation.
My view is to follow the standards and make it the simplest way. Let's do it 😊