Highlighted

Variable BLOG is undefined in mango blog

Community Beginner ,
Jan 27, 2015

Copy link to clipboard

Copied

Variable BLOG is undefined

I created mango blog a year ago and it was working fine but now it is showing me error in admin panel login like this Variable BLOG is undefined

Variable BLOG is undefined.

at cflogin2ecfm1129036560.runPage(C:\sites\accounts\ddddd.com\www\blog\admin\login.cfm:7)

Login page code : 

<cfif structkeyexists(templates,"login")>

  <cfset request.adminLoginTemplate = blog.getSetting('skins').path & blog.getSkin() & "/" & templates['login'].file />

</cfif>

application cfc code

<cfsetting showdebugoutput="false">

<cfset blog = request.blogManager.getBlog() />

<cfset isAdmin = findNoCase(blog.getSetting('urls').admin,arguments.targetPage)/>

<cfif isAdmin AND NOT ( request.blogManager.isCurrentUserLoggedIn() AND

listFind(request.blogManager.getCurrentUser().getCurrentrole(blog.getId()).permissions, "access_admin") )>

<cfset request.administrator = request.blogManager.getAdministrator() />

<cfinclude template="admin/login.cfm">

<cfreturn false>

<cfelseif isAdmin>

<!--- until we get error handling in the admin, remove onError method --->

<cfset StructDelete(this,"onError") />

<cfset request.administrator = request.blogManager.getAdministrator() />

<cfset request.formHandler = createObject("component","admin.FormHandler").init(request.administrator,

request.blogManager.getCurrentUser()) />

</cfif>

<cfset structappend(request,request.blogManager.handleRequest(targetPage,url,form),true)/>

<cfreturn true>

Pls help me

Views

196

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Variable BLOG is undefined in mango blog

Community Beginner ,
Jan 27, 2015

Copy link to clipboard

Copied

Variable BLOG is undefined

I created mango blog a year ago and it was working fine but now it is showing me error in admin panel login like this Variable BLOG is undefined

Variable BLOG is undefined.

at cflogin2ecfm1129036560.runPage(C:\sites\accounts\ddddd.com\www\blog\admin\login.cfm:7)

Login page code : 

<cfif structkeyexists(templates,"login")>

  <cfset request.adminLoginTemplate = blog.getSetting('skins').path & blog.getSkin() & "/" & templates['login'].file />

</cfif>

application cfc code

<cfsetting showdebugoutput="false">

<cfset blog = request.blogManager.getBlog() />

<cfset isAdmin = findNoCase(blog.getSetting('urls').admin,arguments.targetPage)/>

<cfif isAdmin AND NOT ( request.blogManager.isCurrentUserLoggedIn() AND

listFind(request.blogManager.getCurrentUser().getCurrentrole(blog.getId()).permissions, "access_admin") )>

<cfset request.administrator = request.blogManager.getAdministrator() />

<cfinclude template="admin/login.cfm">

<cfreturn false>

<cfelseif isAdmin>

<!--- until we get error handling in the admin, remove onError method --->

<cfset StructDelete(this,"onError") />

<cfset request.administrator = request.blogManager.getAdministrator() />

<cfset request.formHandler = createObject("component","admin.FormHandler").init(request.administrator,

request.blogManager.getCurrentUser()) />

</cfif>

<cfset structappend(request,request.blogManager.handleRequest(targetPage,url,form),true)/>

<cfreturn true>

Pls help me

Views

197

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 27, 2015 0
BKBK LATEST
Adobe Community Professional ,
Jan 28, 2015

Copy link to clipboard

Copied

I expected the lines of code that are in REQUEST scope to be in onRequestStart rather than in the pseudo-constructor area (What's in a name, heh?). In any case, if you want the blog defined in the Application page to exist in login.cfm, it will have to be defined as <cfset request.blog = request.blogManager.getBlog() /> instead of <cfset blog = request.blogManager.getBlog() />. Accordingly, the code in login.cfm would also use request.blog in place of blog.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 28, 2015 0