Menu Content

Podpora

> Diskusní fóra, FAQs & placená podpora
Welcome, Guest
Username Password: Remember me

Error in factory.php @ standardbuttons.php
(1 viewing) (1) Guest
Document management system (DMS) component for Joomla!

If your topic falls within one of the subcategories, then please post it directly there. Post to this parent category only if your question does not match any subcategory topic.
  • Page:
  • 1

TOPIC: Error in factory.php @ standardbuttons.php

Error in factory.php @ standardbuttons.php 14 years, 11 months ago #8994

  • mx5gr
  • OFFLINE
  • Posts: 63
We published the plugin "Standard Buttons". However, when the latest downloads module is enabled, we get a blank frontend screen and the following error in the PHP error log:

PHP Warning: require_once(C:\inetpub\wwwroot\administrator\components\com_content\helpers\factory.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in C:\inetpub\wwwroot\plugins\joomdoc\standardbuttons.php on line 20

The plugin tries to find factory.php inside the com_content administrator folder, whereas the file resides inside com_joomdoc folder. The erroneous line 20 is

require_once (JPATH_COMPONENT_ADMINISTRATOR.DS.'helpers'.DS.'factory.php');

I resolved it temporarily by manually declaring JPATH_COMPONENT_ADMINISTRATOR @ line 20 of standardbuttons.php to the correct path.


Please help!
Last Edit: 14 years, 11 months ago by mx5gr.
The topic has been locked.

Re:Error in factory.php @ standardbuttons.php 14 years, 10 months ago #9153

The problem is in the plugin code. the correct path is: C:\inetpub\wwwroot\administrator\components\com_content\helper not helpers

Correcting this problem causes another error; Fatal error: Cannot redeclare class DocmanFactory in C:\inetpub\wwwroot\administrator\components\com_content\helper\factory.php on line 17

How does one fix that?

How did you manually correct this to make it work?
The topic has been locked.

Re:Error in factory.php @ standardbuttons.php 14 years, 10 months ago #9156

  • mx5gr
  • OFFLINE
  • Posts: 63
I modified the standardbuttons plugin as:


defined ( '_JEXEC' ) or die ( 'Restricted access' );

$mainframe->registerEvent( 'onFetchButtons', 'bot_standardbuttons' );

define ( 'JPATH_COMPONENT_ADMINISTRATOR1', 'C:\inetpub\wwwroot\administrator\components\com_joomdoc');

require_once (JPATH_COMPONENT_ADMINISTRATOR1.DS.'helpers'.DS.'factory.php');


Even if helpers is changed to helper, there is no factory.php inside the com_content\helper directory...
The topic has been locked.

Re:Error in factory.php @ standardbuttons.php 14 years, 10 months ago #9176

So copy factory.php from where it is located and place it into the necessary location.
The topic has been locked.

Re:Error in factory.php @ standardbuttons.php 14 years, 10 months ago #9202

Same issue, anybody get past this?

  • Changed line 20 in standardbuttons.php
  • copied factory.php to administrator/components/com_content/helper/


Then got: "Cannot redeclare class DocmanFactory in...factory.php" (as did enoon)

Then JoomDOC file upload failed due to line 20 change. Changed it back and uploads OK again.


So....

How DOES one fix that?


Shouldn't have to do major surgery one would think...

Just installed JoomDOC prior to the module so it can't be an overwritten file.

JoomDOC is a great component. This module would really top it off!

Thanks in advance for anyone's time...
Last Edit: 14 years, 10 months ago by andrewfr.
The topic has been locked.

Re:Error in factory.php @ standardbuttons.php 14 years, 9 months ago #9890

  • MoJo
  • OFFLINE
  • Posts: 1
To fix this you just have to change on line:

change line 20 in /plugins/joomdoc/standardbuttons.php to

require_once (JPATH_ADMINISTRATOR.DS.'components'.DS.'com_joomdoc'.DS.'helpers'.DS.'factory.php');

The plugin is always trying to load the file from /administrator/components/com_content not from /administrator/components/com_joomdoc where it should.

Worked for me. Hope it helps!

Regards, MoJo
The topic has been locked.
  • Page:
  • 1
Přihlášení uživatele Prázdný