1
Peekay
Setting manual trust path = blank module install page
  • 2013/2/13 19:47

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


In 2.5.5, if I set the Xoops Trust Path manually in mainfile.php, e.g.

define("XOOPS_TRUST_PATH"'C:/apachefriends/xampp/htdocs/myxoops-trust-path');


instead of the default:

define("XOOPS_TRUST_PATH"XOOPS_PATH);


I get a blank page on loading the module install page. Debug says:

Fatal error: Class 'ProtectorRegistry' not found in C:apachefriendsxampphtdocsmyxoopsmodulesprotectormytrustdirname.php on line 8


Protector is not installed, but it looks like the hard-coded $mytrustdirname variable in that file is causing the problem. If I remove the protector folder it works. Not sure if there is a way to resolve that? (to avoid others having the same issue). Quite a few modules use the trust path and not everyone will install Protector.

On a side note, it appears that the Xoops DHTML editor strips out back-slashes inside 'code' tags, which is why the above path is all one word. It is properly formed in the debug report.


2
Peekay
Re: Setting manual trust path = blank module install page
  • 2013/2/16 21:32

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


OK, the Protector error may only affect people that set a trust path for modules, but the fact that the Xoops DHTML editor strips out back-slashes inside 'code' tags is definitely a bug. The code tag should render a safe entity for every character entered, no matter what it is.

3
Mamba
Re: Setting manual trust path = blank module install page
  • 2013/2/17 7:50

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


1) I am curious about the Path issue - why would you want to do it?

Our "Trust Path" is the XOOPS_PATH

For modules that use the "XOOPS_TRUST_PATH" name, that's why we have the:

define("XOOPS_TRUST_PATH"XOOPS_PATH);

So just set it as:

define("XOOPS_PATH"'C:/apachefriends/xampp/htdocs/myxoops-trust-path');

and you're done.

Of course, the content of /xoops_lib has to be there too.

2) Quote:
Xoops DHTML editor strips out back-slashes inside 'code' tags is definitely a bug

Please submit as a bug to SourceForge, so we can keep track of it. Please include a link to this thread.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

4
irmtfan
Re: Setting manual trust path = blank module install page
  • 2013/2/18 2:23

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


1- I can set XOOPS_TRUST_PATH manually without issue using slashes. ( but it is better to keep it equal to XOOPS_PATH as Mamba said)

// Alias of XOOPS_PATH, for compatibility, temporary solution
    
define("XOOPS_TRUST_PATH","F:/xampp/htdocs/xoops255/xoops_lib");


2- Im sure xoops sanitizer strip backslashes not dhtml editor. maybe it is a bug need more investigation.


5
Peekay
Re: Setting manual trust path = blank module install page
  • 2013/2/18 18:50

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Quote:

Mamba wrote:

Of course, the content of /xoops_lib has to be there too.


Thx Mamba, that helped me find the problem. In Xoops 2.3, I used a different version of protector than the one that shipped with Xoops. The install instructions said to set up a folder as the trust path and I did, not realising that the xoops_lib folder could have been used for this. Looking inside xoops_lib, I can now see the 'modules' folder.

It does appear however, that the Protector folder needs to be copied to the folder you choose, whether you install it or not, otherwise you do get the blank module install screen.

@irmtfan

Yes, the back-slash thing is a separate issue with DHTML, or perhaps sanitiser.

6
Mamba
Re: Setting manual trust path = blank module install page
  • 2013/2/18 19:14

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Quote:
It does appear however, that the Protector folder needs to be copied to the folder you choose, whether you install it or not, otherwise you do get the blank module install screen.

That's not entirely correct. You need to copy it ONLY if you have Protector files in the main modules folder:

/modules/protector

In XOOPS 2.5.x, Protector is a D3 module, i.e. if you have it in the /modules folder, than you also need to have it in the Lib (i.e. XOOPS_TRUST_PATH) folder:

/xoops_lib/modules/protector

Just run a test - set a new installation folder and before you run the installation, remove Protector from both folders:

/modules
/xoops_lib/modules

and then install. It should work just fine.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

Login

Who's Online

432 user(s) are online (293 user(s) are browsing Support Forums)


Members: 0


Guests: 432


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits