OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



a page doesn't display

Open Harvester Systems support questions and answers, bug reports, and development issues.

Moderators: jmacgreg, michael, John

Forum rules
Developer Resources:

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome.

a page doesn't display

Postby clairemarcade » Wed Apr 16, 2014 3:22 am

Hello,
I have a problem with my page Contact http://alpha.portaildupatrimoineoral.or ... hp/contact who should be accessible by the footer on "Mentions légales et contact" http://alpha.portaildupatrimoineoral.or ... .php/index. It's not display !

It displays this :

/** * @file pages/contact/index.php * * Copyright (c) 2005-2007 Alec Smecher and John Willinsky * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. * * Handle requests for about functions. * * @package pages.contact * * $Id: index.php,v 1.5 2007/01/17 00:48:56 asmecher Exp $ */ define('HANDLER_CLASS', 'ContactHandler'); import('pages.contact.ContactHandler'); ?>
404 Not Found
Stack Trace:
File: /sites/portoral/www/htdocs_alpha/lib/pkp/classes/core/PKPPageRouter.inc.php line 167
Function: Dispatcher->handle404()

File: /sites/portoral/www/htdocs_alpha/lib/pkp/classes/core/Dispatcher.inc.php line 128
Function: PKPPageRouter->route(Object(Request))

File: /sites/portoral/www/htdocs_alpha/lib/pkp/classes/core/PKPApplication.inc.php line 176
Function: Dispatcher->dispatch(Object(Request))

File: /sites/portoral/www/htdocs_alpha/index.php line 65
Function: PKPApplication->execute()


I can't find what is the problem in the source code ..

Can you help me ?

Thanks.

Claire
(Sorry for my english ..)
clairemarcade
 
Posts: 11
Joined: Thu Mar 27, 2014 9:42 am

Re: a page doesn't display

Postby asmecher » Wed Apr 16, 2014 6:24 am

Hi Claire,

I think you've introduced a typo into pages/contact/index.php -- compare it against the original version, looking especially at the top of the file.

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

Re: a page doesn't display

Postby clairemarcade » Wed Apr 16, 2014 7:48 am

Hi Smecher,

Thanks you for your answer !

In fact I found some error, but it can't display neither..
Below, it's my source code of pages/contact/index.php after my changes :

<?php

/**
* @file pages/contact/index.php
*
* Copyright (c) 2005-2012 Alec Smecher and John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Handle requests for contact functions.
*
* @package pages.contact
*
*/
// $Id$
define('HANDLER_CLASS', 'ContactHandler');
import('pages.contact.ContactHandler');
?>


And below, it's the new message, but I can't understand this message !?

/** * @file pages/contact/ContactHandler.inc.php * * Copyright (c) 2005-2007 Alec Smecher and John Willinsky * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. * * @package pages.contact * @class contactHandler * * Handle requests for the Contact page. * * $Id: ContactHandler.inc.php,v 1.5 2007/01/17 00:48:55 asmecher Exp $ */ class ContactHandler extends Handler { /** * Display contact page. */ function index() { parent::validate(); $templateMgr = &TemplateManager::getManager(); $site = &Request::getSite(); //$contact = $site->getContact(); $contact = file_get_contents('./pages/contact/contact.txt'); $templateMgr->assign('contact', $contact); $templateMgr->display('contact/index.tpl'); } /** * Setup common template variables. * @param $subclass boolean set to true if caller is below this handler in the hierarchy */ function setupTemplate($subclass = false) { parent::validate(); $templateMgr = &TemplateManager::getManager(); if ($subclass) $templateMgr->assign('pageHierarchy', array(array('contact', 'navigation.contact'))); } /** * Display contact page. */ function contact() { parent::validate(true); contactHandler::setupTemplate(true); $site = &Request::getSite(); $templateMgr = &TemplateManager::getManager(); $templateMgr->display('contact/index.tpl'); } /** * Display contact the harvester page. */ function harvester() { parent::validate(); contactHandler::setupTemplate(true); $templateMgr = &TemplateManager::getManager(); $templateMgr->display('contact/harvester.tpl'); } } ?>
404 Not Found
Stack Trace:
File: /sites/portoral/www/htdocs_alpha/lib/pkp/classes/core/PKPPageRouter.inc.php line 167
Function: Dispatcher->handle404()

File: /sites/portoral/www/htdocs_alpha/lib/pkp/classes/core/Dispatcher.inc.php line 128
Function: PKPPageRouter->route(Object(Request))

File: /sites/portoral/www/htdocs_alpha/lib/pkp/classes/core/PKPApplication.inc.php line 176
Function: Dispatcher->dispatch(Object(Request))

File: /sites/portoral/www/htdocs_alpha/index.php line 65
Function: PKPApplication->execute()


for information the code of the original version is :

<?php
/**
* @file pages/about/index.php
*
* Copyright (c) 2005-2007 Alec Smecher and John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Handle requests for about functions.
*
* @package pages.about
*
* $Id: index.php,v 1.5 2007/01/17 00:48:56 asmecher Exp $
*/
define('HANDLER_CLASS', 'ContactHandler');
import('pages.contact.ContactHandler');
?>


I don't understand, why it's refered to the page about... ?

Thanks for your help !

Claire
clairemarcade
 
Posts: 11
Joined: Thu Mar 27, 2014 9:42 am

Re: a page doesn't display

Postby asmecher » Wed Apr 16, 2014 7:50 am

Hi Claire,

It looks like you've made the same mistake in pages/contact/ContactHandler.inc.php.

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

Re: a page doesn't display

Postby clairemarcade » Wed Apr 16, 2014 8:16 am

Hi Smecher,

I 'm sorry, I did changes, but now my page contact is Withe !! I don't know why ?

you can see, below, my code of pages/contact/ContactHandler.inc.php.

<?php
/**
* @file pages/contact/ContactHandler.inc.php
*
* Copyright (c) 2005-2012 Alec Smecher and John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @package pages.contact
* @class contactHandler
*
* Handle requests for the Contact page.
*
*/

// $Id$

class ContactHandler extends Handler {

/**
* Display contact page.
*/
function index() {
parent::validate();

$templateMgr = &TemplateManager::getManager();

$site = &Request::getSite();
//$contact = $site->getContact();
$contact = file_get_contents('./pages/contact/contact.txt');
$templateMgr->assign('contact', $contact);

$templateMgr->display('contact/index.tpl');
}


/**
* Setup common template variables.
* @param $subclass boolean set to true if caller is below this handler in the hierarchy
*/
function setupTemplate($subclass = false) {
parent::validate();

$templateMgr = &TemplateManager::getManager();
if ($subclass) $templateMgr->assign('pageHierarchy', array(array('contact', 'navigation.contact')));
}

/**
* Display contact page.
*/
function contact() {
parent::validate(true);

contactHandler::setupTemplate(true);

$site = &Request::getSite();

$templateMgr = &TemplateManager::getManager();
$templateMgr->display('contact/index.tpl');
}

/**
* Display contact the harvester page.
*/
function harvester() {
parent::validate();

contactHandler::setupTemplate(true);

$templateMgr = &TemplateManager::getManager();
$templateMgr->display('contact/harvester.tpl');
}
}
?>


Thanks you very much !!

Claire
clairemarcade
 
Posts: 11
Joined: Thu Mar 27, 2014 9:42 am

Re: a page doesn't display

Postby asmecher » Wed Apr 16, 2014 8:31 am

Hi Claire,

I'm afraid this is pretty difficult to read; I'd suggest using the copies of the files directly from the download, making changes one at a time and testing as you go. Alternately, check out the standard GNU "diff" tool, which can be used to compare files and describe only the differences between them.

For blank pages, see http://pkp.sfu.ca/questions/when-i-clic ... lank-page/ for some debugging hints.

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

Re: a page doesn't display

Postby clairemarcade » Fri Apr 18, 2014 4:10 am

Hi Smecher,

thanks you for your explication about Blank pages.
I tried your third advice:
function import($class) {
echo "Importing " . $class . "<br/>\n";

And it display in the end of the bi list : "Importing lib.pkp.classes.cache.CacheManager"

I found in XML Validation this error below,
Errors in file ???:
-1: -1 Premature end of file.
???


I understand that there is a begin in the ligne (-1) but i don't see a ligne (-1) on my file by Editra; It can be the source of my problem ?

Thank you !

Claire
clairemarcade
 
Posts: 11
Joined: Thu Mar 27, 2014 9:42 am

Re: a page doesn't display

Postby asmecher » Sat Apr 19, 2014 4:09 pm

Hi Claire,

What file are you sending to the XML validator?

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

Re: a page doesn't display

Postby clairemarcade » Tue Apr 22, 2014 12:24 am

Hi Smecher,

It was the file lib/pkp/classes/cache/CacheManager.inc.php that I sent to the XML validator.

Regards,

Claire
clairemarcade
 
Posts: 11
Joined: Thu Mar 27, 2014 9:42 am

Re: a page doesn't display

Postby asmecher » Tue Apr 22, 2014 1:26 pm

Hi Claire,

The XML validator cannot validate PHP files; it can only validate XML files.

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


Return to Open Harvester Systems Support and Development

Who is online

Users browsing this forum: No registered users and 0 guests