stevewithington / MuraFW1

Base Mura CMS plugin using FW/1 as its application framework.
Apache License 2.0
27 stars 23 forks source link

request._fw1.DOACTION is undefined #49

Open boris-schwarz opened 7 years ago

boris-schwarz commented 7 years ago

When restructuring an old Plugin to meet the architecture of this new MuraFW1 Plugin, I came across the following error:

request._fw1.DOACTION is undefined when updating the plugin or doing an Appreload.

I did some debugging and the following change in /framework/one.cfc did the trick, since request._fw1 was always an empty struct:

if ( !structKeyExists( request, '_fw1' )) { // not working to if ( !structKeyExists( request, '_fw1' ) || structIsEmpty(request._fw1)) { // working

The Error started in /model/handlers/murafw1.cfc at getApplication().setupApplicationWrapper()... Going from there it went to /Application.cfc at setupApplicationWrapper(), which lead directly into /framework/one.cfc at setupApplicationWrapper() where it basically fails at the first line of the function if ( structKeyExists( request._fw1, "appWrapped" ) ) return; because request._fw1 was always empty.

I compared every critical file between a fresh download of MuraFW1 and my restructured Plugin to make sure I didn't leave out a file or configuration. Apart from some View- and Layout-Files, the code seems to be matching (using BeyondCompare).

A point might be, that it's also happening in a manually upgraded Version of Mura CMS (from 6.1 to 7).

Another point also might be, that Mura cannot rename /plugins/[newPluginID]/ (e.g. /plugins/12/) to /plugins/myPluginPackage/ when installing the plugin. I renamed the folder and changed tPlugins.package in the database.

gpearson commented 6 years ago

The last paragraph I had the same issue. I resolved it by fixing the install function of plugin.cfc. Anytime the plugin had an issue due to my typos the plugin would not rename. Once I figured that out I was up and running