Loading ...
Sorry, an error occurred while loading the content.
 

Unknown Fuseaction in Fusebox 5

Expand Messages
  • neobob182
    Hey Everyone, I am converting from Fusebox 3 to Fusebox 5 and I have a quick question that maybe someone can help me with. In Fusebox 3 in the switch.cfm file
    Message 1 of 6 , Apr 1, 2008
      Hey Everyone,

      I am converting from Fusebox 3 to Fusebox 5 and I have a quick
      question that maybe someone can help me with. In Fusebox 3 in the
      switch.cfm file you could use a defaultcase statement where no
      fuseaction name was needed. I need to be able to call a couple of
      pages in Fusebox 5 if the fuseaction name is unknown, however it
      throws errors when I do. Any suggestions?

      Thanks,
      Jody
    • Josh Carrico
      You could utilize the fusebox error templates for this, fusebox.missingFuse.cfm to be specific. This would normally catch the error and display the generic
      Message 2 of 6 , Apr 1, 2008
        You could utilize the fusebox error templates for this, fusebox.missingFuse.cfm to be specific.
        This would normally catch the error and display the generic error message. You could modify the fusebox.missingFuse.cfm file to handle your issue.

        In FB 5.5 the errortemplates were moved from within the skeleton apps to the fusebox5 core files.
        Since you wouldnt want to incorporate this custom handler for all your apps using fusebox5 core files, you would want to modify your fusebox.xml.cfm file to point to a custom /errortemplates/ folder which contains your custom fusebox.missingFuse.cfm.

        You would add: <parameter name="errortemplatesPath" value="/myCustomErrorTemplates/errortemplates/" />

        Hope that helps.
        JOSH

        Hey Everyone,

        I am converting from Fusebox 3 to Fusebox 5 and I have a quick
        question that maybe someone can help me with. In Fusebox 3 in the
        switch.cfm file you could use a defaultcase statement where no
        fuseaction name was needed. I need to be able to call a couple of
        pages in Fusebox 5 if the fuseaction name is unknown, however it
        throws errors when I do. Any suggestions?

        Thanks,
        Jody
      • Phillip M. Vector
        ... Well, first of all, you should always put in a fuseaction and the correct one for that circuit. Second, if you want something like
        Message 3 of 6 , Apr 1, 2008
          neobob182 wrote:
          > I am converting from Fusebox 3 to Fusebox 5 and I have a quick
          > question that maybe someone can help me with. In Fusebox 3 in the
          > switch.cfm file you could use a defaultcase statement where no
          > fuseaction name was needed. I need to be able to call a couple of
          > pages in Fusebox 5 if the fuseaction name is unknown, however it
          > throws errors when I do. Any suggestions?

          Well, first of all, you should always put in a fuseaction and the
          correct one for that circuit.

          Second, if you want something like index.cfm?fuseaction=Foo&id=Bar and
          have it go to the default circuit, I suppose int he index, you can check
          to see if the fusebox.originalfuseaction variable is '' and if it is,
          set it to 'Default'..
        • neobob182
          ... message. ... apps to the ... your apps ... Josh, That worked perfectly! Thanks for the great idea! Thanks, Jody
          Message 4 of 6 , Apr 1, 2008
            --- In fusebox5@yahoogroups.com, "Josh Carrico" <sigepjedi@...> wrote:
            >
            > You could utilize the fusebox error templates for this,
            > fusebox.missingFuse.cfm to be specific.
            > This would normally catch the error and display the generic error
            message.
            > You could modify the fusebox.missingFuse.cfm file to handle your issue.
            >
            > In FB 5.5 the errortemplates were moved from within the skeleton
            apps to the
            > fusebox5 core files.
            > Since you wouldnt want to incorporate this custom handler for all
            your apps
            > using fusebox5 core files, you would want to modify your
            > fusebox.xml.cfmfile to point to a custom /errortemplates/ folder which
            > contains your custom
            > fusebox.missingFuse.cfm.
            >
            > You would add: <parameter name="errortemplatesPath"
            > value="/myCustomErrorTemplates/errortemplates/" />
            >
            > Hope that helps.
            > JOSH
            >
            > Hey Everyone,
            > >
            > > I am converting from Fusebox 3 to Fusebox 5 and I have a quick
            > > question that maybe someone can help me with. In Fusebox 3 in the
            > > switch.cfm file you could use a defaultcase statement where no
            > > fuseaction name was needed. I need to be able to call a couple of
            > > pages in Fusebox 5 if the fuseaction name is unknown, however it
            > > throws errors when I do. Any suggestions?
            > >
            > > Thanks,
            > > Jody
            > >
            >

            Josh,

            That worked perfectly! Thanks for the great idea!

            Thanks,
            Jody
          • aliaspooryorik
            Hi Josh and Jody, If you just want to use one set of Core Files then it is better to catch a missing fuseaction in the fusebox,.init.cfm file as this can be
            Message 5 of 6 , Apr 2, 2008
              Hi Josh and Jody,

              If you just want to use one set of Core Files then it is better to
              catch a missing fuseaction in the fusebox,.init.cfm file as this can
              be set or web application.

              For example:


              <!--- now we check the current fuseaction against the permissions, and
              load the login form if failed --->
              <cfif ( StructKeyExists(myFusebox.getApplication(),
              "fuseactionvariable") ) >
              <cfset variables.fa2Check =
              attributes[myFusebox.getApplication().fuseactionvariable] />

              <!--- check that the fuseaction is valid... --->
              <cfif (
              ListLen(variables.fa2Check, ".") neq 2
              )
              Or (
              Not StructKeyExists(myFusebox.getApplication().circuits,
              ListFirst(variables.fa2Check, '.') )
              )
              Or (
              Not
              StructKeyExists(myFusebox.getApplication().circuits[ListFirst(variables.fa2Check,
              '.')].fuseactions, ListLast(variables.fa2Check, '.') )
              ) >
              <!--- fuseaction is invalid, could set it to the defaultFuseaction
              or leave it and allow fb errortemplates to trap it... --->
              <cfheader statuscode="404" statustext="Not Found" />
              <!--- override fuseaction to point to a 404 page within Fusebox --->
              <cfset attributes[myFusebox.getApplication().fuseactionvariable] =
              "Site.NotFound" />

              </cfif>
              </cfif>

              I find this works really well.

              Regards,

              - John

              http://www.aliaspooryorik.com/blog/

              --- In fusebox5@yahoogroups.com, "neobob182" <neobob182@...> wrote:
              >
              > --- In fusebox5@yahoogroups.com, "Josh Carrico" <sigepjedi@> wrote:
              > >
              > > You could utilize the fusebox error templates for this,
              > > fusebox.missingFuse.cfm to be specific.
              > > This would normally catch the error and display the generic error
              > message.
              > > You could modify the fusebox.missingFuse.cfm file to handle your
              issue.
              > >
              > > In FB 5.5 the errortemplates were moved from within the skeleton
              > apps to the
              > > fusebox5 core files.
              > > Since you wouldnt want to incorporate this custom handler for all
              > your apps
              > > using fusebox5 core files, you would want to modify your
              > > fusebox.xml.cfmfile to point to a custom /errortemplates/ folder which
              > > contains your custom
              > > fusebox.missingFuse.cfm.
              > >
              > > You would add: <parameter name="errortemplatesPath"
              > > value="/myCustomErrorTemplates/errortemplates/" />
              > >
              > > Hope that helps.
              > > JOSH
              > >
              > > Hey Everyone,
              > > >
              > > > I am converting from Fusebox 3 to Fusebox 5 and I have a quick
              > > > question that maybe someone can help me with. In Fusebox 3 in the
              > > > switch.cfm file you could use a defaultcase statement where no
              > > > fuseaction name was needed. I need to be able to call a couple of
              > > > pages in Fusebox 5 if the fuseaction name is unknown, however it
              > > > throws errors when I do. Any suggestions?
              > > >
              > > > Thanks,
              > > > Jody
              > > >
              > >
              >
              > Josh,
              >
              > That worked perfectly! Thanks for the great idea!
              >
              > Thanks,
              > Jody
              >
            • neobob182
              John, I am trying to set up another site and I thought I d try your code that you give here out and see how it works. When I put this in my fusebox.init.cfm
              Message 6 of 6 , Jul 25, 2008
                John,

                I am trying to set up another site and I thought I'd try your code
                that you give here out and see how it works. When I put this in my
                fusebox.init.cfm file I get a error in my myfusebox.cfc file and it's
                telling me that Originalcircuit is undefined in This. Is there some
                code that I have to change or am I not putting your code in the right
                place? Any help would be greatly appreciated, it sounds like onces
                it's in place it will really work well.

                Thanks,
                Jody


                --- In fusebox5@yahoogroups.com, "aliaspooryorik" <john_forum@...> wrote:
                >
                > Hi Josh and Jody,
                >
                > If you just want to use one set of Core Files then it is better to
                > catch a missing fuseaction in the fusebox,.init.cfm file as this can
                > be set or web application.
                >
                > For example:
                >
                >
                > <!--- now we check the current fuseaction against the permissions, and
                > load the login form if failed --->
                > <cfif ( StructKeyExists(myFusebox.getApplication(),
                > "fuseactionvariable") ) >
                > <cfset variables.fa2Check =
                > attributes[myFusebox.getApplication().fuseactionvariable] />
                >
                > <!--- check that the fuseaction is valid... --->
                > <cfif (
                > ListLen(variables.fa2Check, ".") neq 2
                > )
                > Or (
                > Not StructKeyExists(myFusebox.getApplication().circuits,
                > ListFirst(variables.fa2Check, '.') )
                > )
                > Or (
                > Not
                >
                StructKeyExists(myFusebox.getApplication().circuits[ListFirst(variables.fa2Check,
                > '.')].fuseactions, ListLast(variables.fa2Check, '.') )
                > ) >
                > <!--- fuseaction is invalid, could set it to the defaultFuseaction
                > or leave it and allow fb errortemplates to trap it... --->
                > <cfheader statuscode="404" statustext="Not Found" />
                > <!--- override fuseaction to point to a 404 page within Fusebox --->
                > <cfset attributes[myFusebox.getApplication().fuseactionvariable] =
                > "Site.NotFound" />
                >
                > </cfif>
                > </cfif>
                >
                > I find this works really well.
                >
                > Regards,
                >
                > - John
                >
                > http://www.aliaspooryorik.com/blog/
                >
                > --- In fusebox5@yahoogroups.com, "neobob182" <neobob182@> wrote:
                > >
                > > --- In fusebox5@yahoogroups.com, "Josh Carrico" <sigepjedi@> wrote:
                > > >
                > > > You could utilize the fusebox error templates for this,
                > > > fusebox.missingFuse.cfm to be specific.
                > > > This would normally catch the error and display the generic error
                > > message.
                > > > You could modify the fusebox.missingFuse.cfm file to handle your
                > issue.
                > > >
                > > > In FB 5.5 the errortemplates were moved from within the skeleton
                > > apps to the
                > > > fusebox5 core files.
                > > > Since you wouldnt want to incorporate this custom handler for all
                > > your apps
                > > > using fusebox5 core files, you would want to modify your
                > > > fusebox.xml.cfmfile to point to a custom /errortemplates/ folder
                which
                > > > contains your custom
                > > > fusebox.missingFuse.cfm.
                > > >
                > > > You would add: <parameter name="errortemplatesPath"
                > > > value="/myCustomErrorTemplates/errortemplates/" />
                > > >
                > > > Hope that helps.
                > > > JOSH
                > > >
                > > > Hey Everyone,
                > > > >
                > > > > I am converting from Fusebox 3 to Fusebox 5 and I have a quick
                > > > > question that maybe someone can help me with. In Fusebox 3 in the
                > > > > switch.cfm file you could use a defaultcase statement where no
                > > > > fuseaction name was needed. I need to be able to call a couple of
                > > > > pages in Fusebox 5 if the fuseaction name is unknown, however it
                > > > > throws errors when I do. Any suggestions?
                > > > >
                > > > > Thanks,
                > > > > Jody
                > > > >
                > > >
                > >
                > > Josh,
                > >
                > > That worked perfectly! Thanks for the great idea!
                > >
                > > Thanks,
                > > Jody
                > >
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.