You are not logged in.

  • "MajorWinters" started this thread

Posts: 33

Location: Belgium

Occupation: Software developer

  • Send private message

1

Monday, September 7th 2009, 7:52pm

Unknown cache resource

The following code works perfectly in K2Core.class.php but in MenuListPage.class.php it doesn't.

Source code

1
2
3
4
5
6
7
	protected function renderMenu() {
		// get menu structure from cache		
		$this->menuStructure = WCF::getCache()->get('menu', 'menuStructure');
		// get menu items from cache
		$this->menuItems = WCF::getCache()->get('menu', 'menuItems');
		$this->makeMenuList();
	}


The code in K2Core is used to build the menu on the left, while MenuListPage.class.php is a page in the ACP for menu administration.
Preview: http://beta.k2-solutions.eu
Error in ACP:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Fatal error: unknown cache resource 'menu'

You get more information about the problem in our knowledge base: http://www.woltlab.com/help/?code=11005
Information:

error message: unknown cache resource 'menu'
error code: 11005
file: /var/www/clients/client1/web3/web/subdomains/beta/wcf/lib/system/cache/CacheHandler.class.php (119)
php version: 5.2.6-3ubuntu4.2
wcf version: 1.1.0 Beta 5 (Tempest)
date: Mon, 07 Sep 2009 17:46:02 +0000
request: /acp/index.php?page=MenuList&packageID=92&
referer:
Stacktrace:

#0 /var/www/clients/client1/web3/web/subdomains/beta/lib/acp/page/MenuListPage.class.php(104): CacheHandler->get('menu', 'menuStructure')
#1 /var/www/clients/client1/web3/web/subdomains/beta/lib/acp/page/MenuListPage.class.php(70): MenuListPage->renderMenu()
#2 /var/www/clients/client1/web3/web/subdomains/beta/wcf/lib/page/AbstractPage.class.php(90): MenuListPage->readData()
#3 /var/www/clients/client1/web3/web/subdomains/beta/lib/acp/page/MenuListPage.class.php(96): AbstractPage->show()
#4 /var/www/clients/client1/web3/web/subdomains/beta/wcf/lib/page/AbstractPage.class.php(46): MenuListPage->show()
#5 /var/www/clients/client1/web3/web/subdomains/beta/wcf/lib/util/RequestHandler.class.php(64): AbstractPage->__construct()
#6 /var/www/clients/client1/web3/web/subdomains/beta/wcf/lib/util/RequestHandler.class.php(92): RequestHandler->__construct('MenuList', Array, 'page')
#7 /var/www/clients/client1/web3/web/subdomains/beta/acp/index.php(8): RequestHandler::handle(Array)
#8 {main}


Obviously cache.menu.php exists in /cache (cache folder of standalone application not the WCF cache folder).
Any ideas?

Thank you
And if someone gave you a pile of gold, you'd probably complain that it was too heavy.

  • "MajorWinters" started this thread

Posts: 33

Location: Belgium

Occupation: Software developer

  • Send private message

2

Monday, September 7th 2009, 9:03pm

Sorry guys, my own stupid mistake. :whistling:
I forgot to load the resource in K2ACP.class.php

Looks like taking a break after coding for 8+ hours was useful.
And if someone gave you a pile of gold, you'd probably complain that it was too heavy.

martin.deimos

Intermediate

Posts: 188

Location: Munich

Occupation: CS Student

  • Send private message

3

Tuesday, September 8th 2009, 11:31am

hehe, sounds familiar to me :D
Plugin-Support ausschließlich über die WCom Supportforen des jeweiligen Plugins. Ich mach bis auf weiteres 'Urlaub' von der wCom ;)