On install keep getting message
Could not open modules/tinymce/plugin_reg.php for writing. and it won't install.

I've modified the file manually but it just keeps throwing the error.

Linktocontent itself stays enabled but it keeps removing the enabled ticks from Linktocontent Menu and Linktocontent Node

Comments

stborchert’s picture

Assigned: Unassigned » stborchert

Hi.
I couldn't look into source atm but is the file (plugin_reg.php) protected in any ways? Perhaps you could give write permissions to the system (or IIS) on it and try again.

hth,

Stefan

csc4’s picture

The file isn't write protected - but I don't allow writing into the modules directory for obvious security reasons!!!

As I've already manually put the lines in I don't understand why it's trying to write to the file in any case? Surely it should see them and pass the check? In any case couldn't the error be advisory rather than fatal?

stborchert’s picture

Hi.
Did you try to write-enable the modules dir temporary?

If you insert the string manually, it should look exactly as this:

// linktocontent.module: linktomenu
if (is_dir(drupal_get_path('module', 'tinymce') . '/tinymce/jscripts/tiny_mce/plugins/linktomenu/')) {
  $plugins['linktomenu'] = array();
  $plugins['linktomenu']['theme_advanced_buttons3'] = array('linktomenu');
}

// linktocontent.module: linktonode
if (is_dir(drupal_get_path('module', 'tinymce') . '/tinymce/jscripts/tiny_mce/plugins/linktonode/')) {
  $plugins['linktonode'] = array();
  $plugins['linktonode']['theme_advanced_buttons3'] = array('linktonode');
}

Problem with manual editing: the _install()-hooks aren't excuted and no variables are set (for linktocontent_node and ..._menu).
On installing (for example linktocontent_node) it looks into plugin_reg.php for the string
// linktocontent.module: linktonode. If it's already there, it assumes the module is already installed. If the string isn't present the function tries to write.
A quick solution: edit /linktocontent/contrib/linktocontent_node/linktocontent_node.install and comment out (or remove) the following line: _linktocontent_autoinstall('linktonode');.
The same with all other contrib modules. Then edit your plugin_reg.php and try to install again. It should work.

greetings,

Stefan

stborchert’s picture

Hi.
Any status update?

csc4’s picture

Sorry for the delay getting back to you - it didn't say exactly that in the template - I didn't have the menu entries but that's because I'm not using Categories which I've just noticed seems to be a requirement now? Is that right?

I still can't seem to get it going:

Linktocontent Category	5.x-1.2	Enhances linktocontent_node.module to use it with category.module.
Depends on: Linktocontent Node (disabled), Category (missing)
 	Linktocontent Menu	5.x-1.2	Add links to menu items via a TinyMCE plugin
Depends on: Linktocontent (enabled)
 	Linktocontent Node	5.x-1.2	Add links to nodes via a TinyMCE plugin
Depends on: Linktocontent (enabled), Taxonomy (enabled)
Required by: Linktocontent Category (disabled)

I tick the Linktocontent Menu and it unticks itself again.

stborchert’s picture

I will create a small screencast of the installation procedure (hopefully with working audio) for you. Hopefully it will be ready within the next 24 hours.

greets,

Stefan

stborchert’s picture

Ok, you can watch the screencast at http://www.vimeo.com/clip:202938 (password: drupal).
Audio isn't as good as would have liked (very quiet) it but I hope you can understand mostely everything.

Unfourtunately I couldn't test with IIS because it want install :-{

greetings,

Stefan

stborchert’s picture

Hi. Could you please try the latest development version if the problem still exists?
Or do you finally got it work?

greetings,

Stefan

csc4’s picture

No I couldn't get it to work as I couldn't get past the category dependency - I'll try the new development version and try to get back to you.

stborchert’s picture

Status: Active » Closed (fixed)

Please reopen if still active.

csc4’s picture

Sorry for taking so long to get back to you.

I'm happy to say that your excellent videocast and other help got me there - and the patch making the test optional for writing has helped enormously too and I'm now installed.

Thanks again.