[ic] Can IC always look in ~/pages/?

Grant emailgrant at gmail.com
Thu Sep 30 00:02:23 UTC 2010

>>> My suggestion is to use either an actionmap (if "folder-name" is always
>>> the same) or to use a missing specialsub (if it is not).  In either
>>> case, you can strip out the folder name from the beginning of the path,
>>> grab the page name portion (and if it is blank make it "index"), and
>>> then return the new page name from either the missing specialsub or the
>>> actionmap for Interchange to process for you.
>> The "folder-name" changes.  I do something like the above in an
>> Autoload for GETs, but since all of my POSTs have a path like
>> "/folder-name/process.html",
> It should (but don't quote me on this) still work to rewrite the page to
> /process.html, but you need to do it in an actionmap or missing
> specialsub, not from an autoload.  Actionmap and missing specialsub have
> the advantage that they fire off before autoload (I think, again don't
> quote me on this) and you can modify the passed path and return it for
> IC to re-parse as the page name.  If it sees "process" returned from one
> of these it should treat it as a process page and continue on as expected.

I'm missing something here.  Currently I tell IC what page to load by
parsing the request URI and setting mv_nextpage in an Autoload based
on that parsed URI.  I can't do that with POSTs because the URI is
always the same (/process.html or /folder-name/process.html) so I rely
on IC to make the right choice based on the POST data.  Unfortunately
IC doesn't make the right choice when "folder-name" is in the URI.
Instead I end up with a blank page and the following error in the
global error.log:

Died in server spawn: read: closed at
/usr/local/interchange/lib/Vend/Server.pm line 770.

If I've defined &success=page1 and &fail=page2 in a form profile and
the form is POSTed, what type of processing should I do in a missing
SpecialSub to set mv_nextpage correctly so the correct page is loaded?
 I just need a little more info on the concept.

- Grant

More information about the interchange-users mailing list