Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Poll Module + SS 2.3.3 problem - tinymce.template.js


Go to End


2 Posts   2201 Views

Avatar
Tama

Community Member, 138 Posts

25 November 2009 at 2:43pm

I've just installed the Poll module(latest trunk) and the genericdataadmin module(which is required for Polls) but I'm getting the following error when I fire up the Admin panel:

[Warning] file_get_contents(/var/www/dev00/cms/javascript/tinymce.template.js) [function.file-get-contents]: failed to open stream: No such file or directory
GET /admin/polls/

Line 472 in /var/www/dev00/sapphire/core/Requirements.php
Source

463 		
464 	}
465 	
466 	/**
467 	 * Load the given javascript template with the page.
468 	 * @param file The template file to load.
469 	 * @param vars The array of variables to load.  These variables are loaded via string search & replace.
470 	 */
471 	function javascriptTemplate($file, $vars, $uniquenessID = null) {
472 		$script = file_get_contents(Director::getAbsFile($file));
473 		foreach($vars as $k => $v) {
474 			$search[] = '$' . $k;
475 			$replace[] = str_replace("\\'","'", Convert::raw2js($v));
476 		}
477 		$script = str_replace($search, $replace, $script);
478 		$this->customScript($script, $uniquenessID);

Trace

    * file_get_contents(/var/www/dev00/cms/javascript/tinymce.template.js)
      Line 472 of Requirements.php
    * Requirements_Backend->javascriptTemplate(cms/javascript/tinymce.template.js,Array,)
      Line 133 of Requirements.php
    * Requirements::javascriptTemplate(cms/javascript/tinymce.template.js,Array)
      Line 101 of GenericDataAdmin.php
    * GenericDataAdmin->init()
      Line 32 of PollPage.php
    * PollPage->init()
      Line 113 of Controller.php
    * Controller->handleRequest(HTTPRequest)
      Line 277 of Director.php
    * Director::handleRequest(HTTPRequest,Session)
      Line 121 of Director.php
    * Director::direct(/admin/polls/)
      Line 118 of main.php

From a bit of searching I realise that tinymce.template.js has been removed from 2.3.3 but I'm not sure what changes I need to make to the code to reflect this in the Polls module.

Any help appreciated

Tama

Avatar
Tama

Community Member, 138 Posts

25 November 2009 at 3:03pm

Sussed it - just used the latest trunk of genericdataadmin: http://www.silverstripe.org/generic-data-admin-module/