OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



add new page

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

add new page

Postby cristianviza » Fri Oct 04, 2013 11:28 am

Hello everybody. I need add new page in ojs, I try but I can't show new page :( .
I created two folder:
/page/licencia
files in this folder
* index.php
* IndexLicenciaHandler.inc.php

/tamplates/licencia
files:
*licencia.tpl

for use I write this link : <a href="{url page="licencia" op="licencia"}">Licencia</a>
but however I pick in this link, show these errors, why show these errors?:

404 Not Found

Stack Trace:

File: /var/www/ojs/lib/pkp/classes/core/PKPPageRouter.inc.php line 249
Function: Dispatcher->handle404()
File: /var/www/ojs/lib/pkp/classes/core/Dispatcher.inc.php line 129
Function: PKPPageRouter->route(Object(Request))
File: /var/www/ojs/lib/pkp/classes/core/PKPApplication.inc.php line 183
Function: Dispatcher->dispatch(Object(Request))
File: /var/www/ojs/index.php line 69
Function: PKPApplication->execute()
cristianviza
 
Posts: 75
Joined: Tue Nov 06, 2012 10:22 am
Location: Argentina

Re: add new page

Postby asmecher » Fri Oct 04, 2013 11:31 am

Hi Cristian,

I see at least two potential typos:

- page/licencia should be pages/licencia
- tamplates/licencia should be templates/licencia

Beyond that, it's hard to know without seeing the code (particularly the files in pages/licencia).

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: add new page

Postby cristianviza » Fri Oct 04, 2013 12:44 pm

hello asmecher. my apologies, I'm wrote bad.
path:
ojs/pages/licencia/IndexLicenciaHandler.inc.php : https://docs.google.com/file/d/0B_86aqj65IYPYklZWWJkSWRVSTA/edit?usp=sharing
ojs/pages/licencia/index.php : https://docs.google.com/file/d/0B_86aqj65IYPU01uNEYyWGZtWmM/edit?usp=sharing
ojs/templates/licencia/licencia.tpl: licencia.tpl not uploaded it because it is not important.

link: link : <a href="{url page="licencia" op="licencia"}">Licencia</a> --> error

Regards Cristian.
cristianviza
 
Posts: 75
Joined: Tue Nov 06, 2012 10:22 am
Location: Argentina

Re: add new page

Postby asmecher » Fri Oct 04, 2013 1:01 pm

Hi Cristian,

The value of "op" in the {url ...} call (currently "licencia"), the function name in IndexLicenciaHandler (currently "index"), and the value in the "case" statement in index.php (currently "licencia") all need to match.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 2 guests