Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
may not tag a folder
Ravidialog
Hi,
I am currently custmising the user group for metadata field, in my perl script when I open a file for reading I am getting an error "may not tag a folder".
This error appears when open the meta data form.
Ravi
Find more posts tagged with
Comments
Michael
Hi Ravi
I am sorry but I don't really understand your post, mate. I am a little confused because you talk about the error coming from your perl script, but then you say it happens when you open a form?
Perhaps you could try and explain some more about your problem and attach any relevant scripts, config files etc. It is also a good idea to include the version and platform of the software you are using.
Cheers
Michael
Ravidialog
Hi,
I have perl code to read a file and get a value. This is executed by external script by worlkflow to set metadata default value. so after setting this the metadata form will be opened with these default value.
Now I am getting error "ay not tag a folder"
Ravi
Ravidialog
here the code.
please let me know if there is an other way to read a file.
sub getaddescription
{
my ($aduser)=
@_
;
my $wsTsWf=new ws::TsWf();
my $adfindgroup = $wsTsWf->getGroup($aduser);
$adfindgroup=~ s/[^\\]*\\//;
my ($key, $label, $adgroup);
my (
@temp)
;
my $adresult="";
open FILE, "<$IWHOME/custom/data/group_list.txt";
while (<FILE>)
{
chomp $_;
@temp=split("
,", $_);
$label=$temp[0];
if ($label ne "" && $label ne "Page Title")
{
$key=$temp[1];
$adgroup=$temp[2];
if ($adgroup eq $adfindgroup)
{
$adresult=$key;
}
}
}
close FILE;
return $adresult;
}
Michael
Hi Ravi
The snippet of code you have posted looks alright -- although I suggest you put some error handling around your open statement. However all that code does is read a value from a file? Do you believe that this code is generating your error message?
Cheers
Michael
Adam Stoller
Maybe I'm missing something here (like what some of your custom module code is doing) but I don't see anything in the code you posted that sets extended attributes on anything (files or directories) - perhaps you're looking in the wrong place for the source of the problem?
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com