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)
6.1 cgi menu item drags
Drew_The_Goat
Hello,
In the process of our TeamSite 6.1 migration from TS 5.5.2, we have encountered a bug with the cgi menu items. Our custom deployment code expects the variables area_path, vpath, and selected files under the Edition view as well as the Branch view. These variables are not being passed (we are using a menu item test ipl that prints the cgi variables). We have already successfully added our 5.52 menu items using the Interwoven supplied wrapper script to workj in CCS and CCP.
Anyone else notice that a lot of the variables that were being passed are not available in 6.1? Is there another way to "get them"? Ideally we want to retain all the perl code we created...
Thanks,
Drew
Find more posts tagged with
Comments
Adam Stoller
This has already been discussed within the forums - the CGI form variables changed, there's a cgi pre-processing script that Interwoven provides that essentially creates all the old variables for you, but if you learn the new ones you can avoid the extra processing overhead.
As far as I can tell (at least in CCP) the variables seem to be there for EDITIONS, STAGING, and WORKAREAS - where are you running into problems? (again - this is assuming you've "embraced" the "new" variables)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Drew_The_Goat
Thanks fish,
I could not find a list of the new variables in any of the documentation- is there a list on dev net? I am using wdpro_menu.ipl- is that the cgi pre-processing script you are referring to?
I am in Edition view in CCP and I am trying to invoke a menu item that takes two editions that are selected and does a compare. I can't find the selected files being passed, but I guess if I knew the new variable names I would know what to look for.
Thanks,
Drew
Adam Stoller
that's the preprocessing scrip - yes
I created two custom menu items for show_env.cgi - one which runs things through that script and presents the "old-style" form variables, and another which runs the show_env.cgi directly - so that I can compare/contrast the results while I'm coding.
In this case - you need to look at the $cgi->{form}{vpath} variable and determine if it is a scalar or list value. Something like this:
...
use TeamSite::CGI_lite;
my $cgi = TeamSite::CGI_lite->new();
$cgi->parse_data();
my $vpath = $cgi->{form}{vpath};
my
@paths
;
push(
@paths
, (ref($vpath) eq "ARRAY") ?
@$vpath
: $vpath);
s|^//[^/]+|| foreach(
@paths)
;
This will leave you with an array of archive-rooted vpaths to all the selected items. Hopefully that's sufficient to get you started.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Drew_The_Goat
thanks a lot, this should be enough to go on...
Drew
Migrateduser
Where can I find the documentation regarding the changes from TS5.5.2 to TS6.1 in parameters passed to CGI callouts?
There was a mention in the release notes, but it just says refer documentation for more details.
Which documentation does it refer to?
The problem I'm facing is that, I'm not getting any value in QUERY_STRING parameter.
My CGI callout (being called from metadata capture screen) works fine in TS 5.5.2.
TIA
Adam Stoller
I was referring to CGI code for custom menu items and callouts in TST / Forms - not metadata capture. The environment for cgi-callouts in metadata capture in 6.x is SIGNIFICANTLY different than in previous versions (without MetaTagger). I have a case opened with support right now which starts with tracking FR 46736, but probably goes a bit further.
I hope to get some sort of answer to this later today - but the summary of my issues are:
1) The cgi-callouts have no handle to the file being tagged - preventing interaction with the file during the course of the CGI code.
2) The cgi-callouts only have a handled to the name of the field associated with the callout, not the names of any other fields - preventing [for us] customized validation of the field values in relation to one another (though all the data for the other fields is available - they're all identified as "propXXXXX" where "X" represents a numerical digit - with no mapping of that "name" to the actual field "name"
(Note: An alternative aspect of '2' is that much of what we're doing with the callout might have been able to be done with FormAPI - but FormAPI isn't supported for MDC either).
I'll pass on any relevent information I receive regarding this - but if you have particular issues I suggest you contact Support, reference the FR 46736, and expand on it from there.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Migrateduser
Thanks Adam.
Where can I find the documentation about the changes?
In my CGI callout, I need to reload the same page by passing extra parameters in the query string.
I was reading the querystring using $ENV{QUERY_STRING}.
Now its returning me empty string, so I'm not able to read the parameters.
I'm not sure if this is because of TS 6.1 or perl 5.8.2
If I execute show_env.ipl, that too shows blank string for QUERY_STRING.
What can be the reason?
TIA
Adam Stoller
I'll have to let someone else answer those questions.
Regarding documentation - I think there was some - but most of it I figured out myself using show_env.cgi (running it both with, and without the CGI wrapper that provides "old-style" form variables).
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
lhdavis
Here
is the link to the QA session after the DevNet 6.1 Webcast that lists the variables (see question #2). It's TechNote 51556 if that's easier for you to look up.
Luke Davis
Open Technology Group, Inc.
luke.davis@med.va.gov
Adam Stoller
That tech article is WRONG. Those form variables are *only* passed along if you use the CGI wrapper (wdpro_menu.ipl) - otherwise the list of variables passed is *much* smaller.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
lhdavis
Hopefully someone official (Lissa?) will update the TechNote accordingly.
Luke Davis
Open Technology Group, Inc.
luke.davis@med.va.gov
bscott1
I also posted a feature request back in March regarding the CGI callouts in the metadata forms (Teamsite 6.0 is the same as 6.1 in this behavior). This is a major issue, as you are right, expected variables are simply not there. My feature request is 51858.
Adam Stoller
With the exception of callouts on the metadata capture form - generally all the information you used to have in 5.x *is* available in 6.x - it just may take a bit of additional processing to extract it from the information as it is presented.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Drew_The_Goat
fish you are right- I was able to find most of the necessary cgi infomation by using a combination of a test script and show_env with the wdpro wrapper and without, and then comparing the results.
Looks like there will be some recoding of the Perl but at least I can find the info I need.
Thanks,
Drew
RonaldV
Hi,
just want to add to the discussion that I run into the same issue. When using the wdpro_menu.ipl and starting a menu-item from with an edition (!) these area some env-vars gone: area_id, area_name, area_path AND page_type is set to 'branch' while in 552 it said 'edition'. This could mess up your scripts. :-)
Little hack to solve this is to add this line to the wdpro_menu.ipl:
$href->{waid} = iwattrib($vpath, "objid", 0); #added by hand!!
so in sub getCwdIds it says:
....
} elsif ($cid eq $EDITION_CLASS_ID) {
# No waid
$href->{brid} = iwattrib($vpath, "branch", 0);
$href->{arid} = iwattrib($href->{brid}, "archive",
getContainerVpath($vpath));
$href->{waid} = iwattrib($vpath, "objid", 0); # added by hand!!
$href->{dirid} = iwattrib($vpath, "rootdir", 0);
....
This will get your area-vars back BUT NOTE that now page_type will say 'workarea' iso 'edition'.
Hope this will help, Ronald
TS552, Win2k
OD560