webgui/lib/WebGUI/Asset/Wobject
Scott Walters 28668d4195 Fix for ``unable to call method setting on undefined value'' when turning admin on. Details follow.
It turned out this problem is related to Moose and/or Class::MOP.  I downgraded Moose to 1.25, and Class::MOP to 1.12, and then I got the console just fine when I clicked on "turn admin on".

I managed to operate the Perl debugger on the code, by putting Enbugger->stop at the desired point. I could then debug it interactively.
The stack trace at the point of failure in Search.pm is:
  DB<3> T
$ = WebGUI::Asset::Wobject::Search::_searchRoot_builder(ref(WebGUI::Asset::Wobject::Search)) called from file `constructor WebGUI::Asset::Wobject::Search::new (defined at /home/amir/Downloads/webgui/lib/WebGUI/Asset/Wobject/Search.pm line 214)' line 224
$ = WebGUI::Asset::Wobject::Search::new('WebGUI::Asset::Wobject::Search', ref(HASH)) called from file `/home/amir/Downloads/webgui/lib/WebGUI/Asset.pm' line 1937
$ = WebGUI::Asset::newByPropertyHashRef('WebGUI::Asset', ref(WebGUI::Session), ref(HASH)) called from file `/home/amir/Downloads/webgui/lib/WebGUI/Admin.pm' line 186
@ = WebGUI::Admin::getAssetTypes(ref(WebGUI::Admin)) called from file `/home/amir/Downloads/webgui/lib/WebGUI/Admin.pm' line 279
$ = WebGUI::Admin::getNewContentTemplateVars(ref(WebGUI::Admin)) called from file `/home/amir/Downloads/webgui/lib/WebGUI/Admin.pm' line 811
$ = WebGUI::Admin::www_view(ref(WebGUI::Admin)) called from file `/home/amir/Downloads/webgui/lib/WebGUI/Content/Admin.pm' line 80
$ = WebGUI::Content::Admin::handler(ref(WebGUI::Session)) called from file `/home/amir/Downloads/webgui/lib/WebGUI/Pluggable.pm' line 287
$ = WebGUI::Pluggable::run('WebGUI::Content::Admin', 'handler', ref(ARRAY)) called from file `/home/amir/Downloads/webgui/lib/WebGUI.pm' line 165
$ = eval {...} called from file `/home/amir/Downloads/webgui/lib/WebGUI.pm' line 165
. = WebGUI::handle(ref(WebGUI), ref(WebGUI::Session)) called from file `/home/amir/Downloads/webgui/lib/WebGUI.pm' line 77
@ = WebGUI::call(ref(WebGUI), ref(HASH)) called from file `/usr/lib/perl5/site_perl/5.12.3/Plack/Component.pm' line 39

...
  DB<1> l
38==>    my $session = shift->session;
39    return $session->setting->get("defaultPage");
40 }
41 property classLimiter => (
42                fieldType       => "checkList",
43                default         => undef,
44                vertical        => 1,
45                tab             => "properties",
46                hoverHelp       => ["class limiter description", 'Asset_Search'],
47                label           => ["class limiter", 'Asset_Search'],
  DB<1> p join(",",keys %{$_[0]});
mobileStyleTemplateId,displayTitle,assetSize,classLimiter,newWindow,extraHeadTagsPacked,ownerUserId,extraHeadTags,paginateAfter,isPrototype,isPackage,isHidden,groupIdEdit,encryptPage,inheritUrlFromParent,description,isExportable,lastModified,groupIdView,printableStyleTemplateId

NOTE: "session" is not found there.

With a downgraded Moose:

38==>    my $session = shift->session;
39    return $session->setting->get("defaultPage");
40 }
41 property classLimiter => (
42                fieldType       => "checkList",
43                default         => undef,
44                vertical        => 1,
45                tab             => "properties",
46                hoverHelp       => ["class limiter description", 'Asset_Search'],
47                label           => ["class limiter", 'Asset_Search'],
  DB<1> p  join(",",keys %{$_[0]});
skipNotification,uiLevel,displayTitle,classLimiter,newWindow,synopsis,extraHeadTagsPacked,extraHeadTags,ownerUserId,session,paginateAfter,isHidden,groupIdEdit,encryptPage,inheritUrlFromParent,description,title,printableStyleTemplateId
  DB<2>

("session" is found.)

Amir
2011-07-01 16:31:48 -04:00
..
Collaboration remove WebGUI::Utility 2010-09-07 13:18:49 -05:00
HttpProxy remove useless DESTROYs 2010-04-16 20:57:00 -05:00
Survey Only import what we're going to use from Test::Deep::NoTest. 2010-11-11 14:02:19 -08:00
_NewWobject.skeleton Moose overrides for purge, purgeRevision, and purgeCache. 2010-04-07 16:43:16 -07:00
_NewWobject.skeleton.minimal Change calls to new to newById across Asset/ 2010-03-03 16:27:45 -08:00
Article.pm WebGUI::Session::Http should go away (#11647) 2011-05-11 16:17:54 -04:00
AssetReport.pm Merge commit 'v7.10.17' into 8 2011-06-17 20:13:41 -05:00
Calendar.pm Merge commit 'v7.10.18' into 8 2011-06-21 16:03:49 -05:00
Carousel.pm fix bugs revealed by Test::Class tests 2011-06-02 19:44:06 -05:00
Collaboration.pm Merge branch 'WebGUI8' of github.com:plainblack/webgui into 8 2011-05-13 18:20:52 -05:00
Dashboard.pm Merge branch 'WebGUI8' of github.com:plainblack/webgui into 8 2011-05-13 18:20:52 -05:00
DataForm.pm Repeat ampli's fix (described below) for other occurances on the site. 2011-06-29 19:13:18 -04:00
DataTable.pm Change getMimeType and setMimeType to response->content_type. 2010-11-21 22:35:26 -08:00
EventManagementSystem.pm Repeat ampli's fix (described below) for other occurances on the site. 2011-06-29 19:13:18 -04:00
Folder.pm Merge branch 'WebGUI8' of github.com:plainblack/webgui into 8 2011-05-13 18:20:52 -05:00
Gallery.pm add Gallery to test_content and fix problems with RssFeed role 2011-04-25 15:53:55 -05:00
GalleryAlbum.pm WebGUI::Session::Http should go away (#11647) 2011-05-11 16:17:54 -04:00
HttpProxy.pm WebGUI::Session::Http should go away (#11647) 2011-05-11 16:17:54 -04:00
InOutBoard.pm Repeat ampli's fix (described below) for other occurances on the site. 2011-06-29 19:13:18 -04:00
Layout.pm Merge branch 'WebGUI8' of github.com:plainblack/webgui into 8 2011-05-13 18:20:52 -05:00
Map.pm Merge commit 'v7.10.15' into 8 2011-05-13 18:15:11 -05:00
Matrix.pm WebGUI::Session::Http should go away (#11647) 2011-05-11 16:17:54 -04:00
MessageBoard.pm WebGUI::Session::Http should go away (#11647) 2011-05-11 16:17:54 -04:00
MultiSearch.pm WebGUI::Session::Http should go away (#11647) 2011-05-11 16:17:54 -04:00
Navigation.pm WebGUI::Session::Http should go away (#11647) 2011-05-11 16:17:54 -04:00
Poll.pm Convert Image::Graph and Poll over to use FormBuilder. 2010-11-29 09:37:28 -08:00
ProjectManager.pm migrate PM editProject to FormBuilder 2011-02-03 16:05:37 -06:00
Search.pm Fix for ``unable to call method setting on undefined value'' when turning admin on. Details follow. 2011-07-01 16:31:48 -04:00
Shelf.pm migrate import and export products to Asset Helpers 2011-03-29 23:25:56 -05:00
SQLReport.pm WebGUI::Session::Http should go away (#11647) 2011-05-11 16:17:54 -04:00
StockData.pm Merge commit 'v7.10.15' into 8 2011-05-13 18:15:11 -05:00
StoryArchive.pm Change class => className where func=add. 2011-03-01 18:45:00 -08:00
StoryTopic.pm Merge commit 'v7.10.15' into 8 2011-05-13 18:15:11 -05:00
Survey.pm Repeat ampli's fix (described below) for other occurances on the site. 2011-06-29 19:13:18 -04:00
SyndicatedContent.pm Merge branch 'WebGUI8' of github.com:plainblack/webgui into 8 2011-05-13 18:20:52 -05:00
Thingy.pm Repeat ampli's fix (described below) for other occurances on the site. 2011-06-29 19:13:18 -04:00
TimeTracking.pm rename variables for consistency 2010-10-27 13:06:25 -05:00
UserList.pm move core profile fields into users table 2010-12-03 22:36:30 -06:00
WeatherData.pm Merge commit 'v7.10.15' into 8 2011-05-13 18:15:11 -05:00
WikiMaster.pm Merge commit 'v7.10.15' into 8 2011-05-13 18:15:11 -05:00