Item8297: Jumpbox => change state error

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release:
Applies To: Extension
Component: WorkflowPlugin
Branches:
Reported By: Foswiki:Main.MichaelGustavSimon
Waiting For:
Last Change By: MichaelGustavSimon
If a topic opened via jump like http://myhost/bin/view/MyWeb?topic=MyTopic => change state not work.

Wrong post request URL: http://myhost/bin/rest/WorkflowPlugin/changeState => HTTP 400

-- MichaelGustavSimon - 02 Oct 2009

Without knowing the contents of the apache error log i.e. what cause the 400 it's imposible to guess what caused this. Could have been another plugin, or almost anything.

Leaving open for feedback for now.

-- CrawfordCurrie - 19 Oct 2009

Apache error log is not really necessary to analyze this error.

WorkflowPlugin use the following hidden field.

...
<input type="hidden" value="Web.Topic" name="topic"/>
...

If the topic will be requested by one component evaluated by the get parameter topic, the value of hidden field topic set to topic without web and the following error occurs.

...
ERROR: (400) Invalid REST invocation - Invalid topic parameter Topic
...

Example

Requested URL http://foswiki/bin/view/Web/Topic => value of hidden field topic = Web.Topic => OK
Requested URL http://myhost/bin/view/AccessIbility/AnotherTopic?topic=Topic => value of hidden field topic = Topic => Error

-- MichaelGustavSimon - 19 Oct 2009

Sorry, I'm no closer to understanding. Your sentence "If the topic will be requested by one component evaluated by the get parameter topic, the value of hidden field topic set to topic without web and the following error occurs" is not english (at least, I can't make sense of it). Try describing step-by-step how to reproduce the error.

-- CrawfordCurrie - 26 Oct 2009

Do you read or try the above example?

If the topic will be requested by one component evaluated by the get parameter topic,
       -----                          ---------                  -------------------
         |                               |                               |
       mytopic                         view                  ...view/...?topic=mytopic

the value of hidden field topic set to topic without web and the following error occurs
    ---------------------------        -----------------         ---------------
               |                                |                       |
               |                                |   ERROR: (400) Invalid REST invocation - Invalid topic parameter Topic
               |                                |
               |                   mytopic and not web.mytopic
               |
<input type="hidden" name="topic" value="mytopic"  />

Easy:

The error occurs if the field topic is set to a topic name without the web name only.

  • Request a topic by http://...?topic=mytopic (topic with the possibility to change a state).
  • Try to change the state => ERROR

  • jumpbox.png use for example HTTP-Get-Parameter and the script view to resolve the request.:
    jumpbox.png

-- MichaelGustavSimon - 02 Nov 2009

Ah, OK, I think I finally understand what you are driving at. You are saying that the URL used to display the page affects the function of the "change state" control displayed on that page, yes? And BTW yes, I read your example, but couldn't try it - I didn't understand what you were trying to report. Hence my response.

-- CrawfordCurrie - 06 Nov 2009

... You are saying that the URL used to display the page affects the function of the "change state" control displayed on that page, yes? ...

Yes. smile

-- MichaelGustavSimon - 09 Nov 2009

This is due to the passing of a topic parameter value, which is used by CGI in preference to the one set in the code. It's really a CGI bug IMHO. It can be worked around by not using CGI to create input statements.

-- CrawfordCurrie - 20 May 2010
 

ItemTemplate edit

Summary Jumpbox => change state error
ReportedBy Foswiki:Main.MichaelGustavSimon
Codebase 1.0.6
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Extension
Component WorkflowPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins WorkflowPlugin:0ea8ed5c0cbe
ReleasedIn
I Attachment Action Size Date Who Comment
jumpbox.pngpng jumpbox.png manage 2 K 02 Nov 2009 - 08:18 MichaelGustavSimon  
Topic revision: r11 - 31 Aug 2010, MichaelGustavSimon
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy