OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



OCS Plugin: Static Pages

The Plugin Gallery is a venue for users of PKP software to share their plugins.

Moderators: jmacgreg, michael, John

Forum rules
If you post a plugin here, please include information on which versions of which applications it is compatible with. Attach a tarball of the plugin (e.g. tar cvzf myPlugin-0.1.tar.gz plugins/generic/myPlugin). Thanks for contributing!

Re: OCS Plugin: Static Pages

Postby jalperin » Wed Mar 11, 2009 8:24 am

nageswaran,

You have to execute the database schema to install the tables. Please see the README included with the plugin or this thread on details of how to do this.
jalperin
 
Posts: 156
Joined: Thu Jul 06, 2006 1:03 pm
Location: Buenos Aires

Re: OCS Plugin: Static Pages

Postby borgher » Sun Mar 22, 2009 6:21 pm

Hi Juan,

sorry for the late reply, I was away.

I'm following the standard procedure for adding a static page.
Conference Manager -> System Plugins -> Generic Plugins -> Static Pages -> Edit / Add Content

from here 'Add new page'. I add the pafe content (plain text), fill in all the required fields, and save. I get no error message, but when I go back to the plugin page I can't see the page I just added. I only get the 'No pages have been created' line. The two tables in the database also remain empty.

I can't notice anything patently strange going on. The only weird thing is maybe that at the bottom of the TinyMCE editor textfield there is a line saying "Path: p".

What do you advise?

Thanks again,
Borgher

jalperin wrote:borgher,

Not sure what might be happening. Could you give me a more detailed description on the steps you've taken to create a new page? Are you receiving any errors?
borgher
 
Posts: 2
Joined: Tue Feb 24, 2009 8:21 pm

Re: OCS Plugin: Static Pages

Postby jalperin » Sun Mar 22, 2009 6:32 pm

Borgher,

if you're running a test site, you could try turning on the database debug information in config.inc.php. You wouldn't want to do this on a live site, as it outputs a lot of text on the screen.

Then see if there is an "INSERT INTO static_pages" line somewhere in the debug information. Try to execute that same statement (copy/paste) directly into your DB and see if it outputs an error.

Good luck,
jalperin
 
Posts: 156
Joined: Thu Jul 06, 2006 1:03 pm
Location: Buenos Aires

Re: OCS Plugin: Static Pages

Postby witchie » Tue Jun 16, 2009 3:44 pm

Fantastic!

All about install and use static Pages working perfectlly!

Many thanks on Your beautifull work!

In order to thank you I am attaching the translation file in this post.
Attachments
hr_HR.zip
Croatian (HR) translation for Static Pages OCS Plugin
(1.11 KiB) Downloaded 257 times
witchie
 
Posts: 4
Joined: Tue Jun 16, 2009 3:26 pm

Re: OCS Plugin: Static Pages

Postby sener » Fri Jul 03, 2009 2:23 am

Hi,

Thanks for the plug-in; however, we have the same problem as Borgher.
I get the following when I set the debug option and try to save a static page:
---
(mysql): SET NAMES 'utf8'
(mysql): SELECT * FROM sessions WHERE session_id = '0a86ff04c9d940342fab9d8c45d355be'
(mysql): SELECT * FROM users WHERE user_id = '1'
(mysql): SELECT * FROM user_settings WHERE user_id = '1'
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/others/sxs/public_html/sxsuf/lib/adodb/adodb.inc.php:377) in /home/others/sxs/public_html/sxsuf/classes/session/SessionManager.inc.php on line 56
(mysql): UPDATE sessions SET user_id = '1', ip_address = '100.100.70.70', user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11', created = '1246533781', last_used = 1246609639, remember = 0, data = 'userId|s:1:\"1\";username|s:5:\"kufdm\";' WHERE session_id = '0a86ff04c9d940342fab9d8c45d355be'
(mysql): SELECT * FROM conferences WHERE path = 'sxsuf'
(mysql): SELECT * FROM site
(mysql): SELECT * FROM site_settings
(mysql): SELECT COUNT(*) FROM plugin_settings WHERE plugin_name = 'AcronPlugin' AND setting_name = 'crontab' AND conference_id = 0 AND sched_conf_id = 0
(mysql): UPDATE plugin_settings SET setting_value = 'a:2:{i:0;a:3:{s:9:\"className\";s:20:\"tasks.ReviewReminder\";s:9:\"frequency\";a:1:{s:4:\"hour\";s:1:\"0\";}s:4:\"args\";a:0:{}}i:1;a:3:{s:9:\"className\";s:32:\"tasks.RegistrationExpiryReminder\";s:9:\"frequency\";a:1:{s:4:\"hour\";s:1:\"0\";}s:4:\"args\";a:0:{}}}', setting_type = 'object' WHERE plugin_name = 'AcronPlugin' AND setting_name = 'crontab' AND conference_id = 0 AND sched_conf_id = 0
(mysql): SELECT setting_name, setting_value, setting_type FROM plugin_settings WHERE plugin_name = 'AnnouncementFeedPlugin' AND conference_id = '2' AND sched_conf_id = '0'
(mysql): SELECT setting_name, setting_value, setting_type FROM plugin_settings WHERE plugin_name = 'CustomLocalePlugin' AND conference_id = '2' AND sched_conf_id = '0'
(mysql): SELECT setting_name, setting_value, setting_type FROM plugin_settings WHERE plugin_name = 'TranslatorPlugin' AND conference_id = '0' AND sched_conf_id = '0'
(mysql): SELECT setting_name, setting_value, setting_type FROM plugin_settings WHERE plugin_name = 'AcronPlugin' AND conference_id = '0' AND sched_conf_id = '0'
(mysql): SELECT * FROM versions WHERE current = 1
(mysql): SELECT COUNT(*) FROM sched_confs WHERE conference_id = '2' AND end_date < now()
(mysql): SELECT COUNT(*) FROM sched_confs WHERE conference_id = '2' AND start_date < now() AND end_date > now()
(mysql): SELECT COUNT(*) FROM roles WHERE conference_id = 2 AND sched_conf_id = 0 AND user_id = 1 AND role_id = 16
Warning: Cannot modify header information - headers already sent by (output started at /home/others/sxs/public_html/sxsuf/lib/adodb/adodb.inc.php:377) in /home/others/sxs/public_html/sxsuf/classes/core/Request.inc.php on line 41
(mysql): UPDATE sessions SET user_id = '1', ip_address = '100.100.70.70', user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11', created = '1246533781', last_used = 1246609639, remember = 0, data = 'userId|s:1:\"1\";username|s:5:\"kufdm\";' WHERE session_id = '0a86ff04c9d940342fab9d8c45d355be'
---

As you see there is no "INSERT INTO static_pages" or something similar.

Many thanks in advance.

Best,
-sener

jalperin wrote:Borgher,

if you're running a test site, you could try turning on the database debug information in config.inc.php. You wouldn't want to do this on a live site, as it outputs a lot of text on the screen.

Then see if there is an "INSERT INTO static_pages" line somewhere in the debug information. Try to execute that same statement (copy/paste) directly into your DB and see if it outputs an error.

Good luck,
sener
 
Posts: 4
Joined: Fri Jul 03, 2009 2:06 am

Re: OCS Plugin: Static Pages

Postby jalperin » Fri Jul 03, 2009 1:44 pm

Sener and Borgher,

Not sure what's happening in your installs. If you'd like to PM me a username/password for a journal manager account, I can have a look and see if I can figure it out.
jalperin
 
Posts: 156
Joined: Thu Jul 06, 2006 1:03 pm
Location: Buenos Aires

Re: OCS Plugin: Static Pages

Postby sener » Sat Jul 04, 2009 11:03 am

Sure, Dear Jalperin, I am sending now.

We have tried to trace out what is happening. Not sure about the cause, but here are the observations we have got:
- It seems, somehow, that the "save" button does not call the "save" operation of the static pages plug-in.
- It works when we set "disable_path_info = Off" in config.inc.php, but then we get infinite redirect error (I think, due to our web server).

Thanks for your interest.
-sener

jalperin wrote:Sener and Borgher,

Not sure what's happening in your installs. If you'd like to PM me a username/password for a journal manager account, I can have a look and see if I can figure it out.
sener
 
Posts: 4
Joined: Fri Jul 03, 2009 2:06 am

Re: OCS Plugin: Static Pages

Postby sener » Sat Jul 04, 2009 1:05 pm

Hi again,
I think we have solved it: It is due to a conflict between the "path" field of the StaticPages form and the "path" parameter used when disable_path_info = On.
Best,
-sener

sener wrote:Sure, Dear Jalperin, I am sending now.

We have tried to trace out what is happening. Not sure about the cause, but here are the observations we have got:
- It seems, somehow, that the "save" button does not call the "save" operation of the static pages plug-in.
- It works when we set "disable_path_info = Off" in config.inc.php, but then we get infinite redirect error (I think, due to our web server).

Thanks for your interest.
-sener

sener
 
Posts: 4
Joined: Fri Jul 03, 2009 2:06 am

Re: OCS Plugin: Static Pages

Postby thebigchuckster » Tue Aug 18, 2009 5:30 pm

Is there a way of stopping the TinyMCE editor re-writing URLs when you save static pages?

I'm setting up help pages with this tool (which btw, i think is really useful!)

...but ... when I add a link:
Code: Select all
http://ojs.e-contentmanagement.com/index.php/train/pages/view/section_editor_guide_part1

it gets re-written to
Code: Select all
../../../index.php/train/pages/view/section_editor_guide_part1

and when gets served, the relative link resolves as:
Code: Select all
http://ojs.e-contentmanagement.com/index.php/index.php/train/pages/view/section_editor_guide_part1

which of course borks and the server displays the home page for journal site instead of my help content.

I'm going thru the plugin files to see if I can turn URL re-writing off but any assistance/pointers would be welcome.

Am using OJS 2.2.3, StaticPages 1.1, shared hosting box is a linux box of some flavour.


edit 1: in the short term (e.g. quick-n-dirty fix), i'll go in and change the database content using PHPMyAdmin.

edit 2: I thought I was repeating myself ... and i was <http://pkp.sfu.ca/support/forum/viewtopic.php?f=28&t=3437&start=15#p18737> tho in that other thread, i thought it was just image URLs that were being re-written.

tia,
Charles
thebigchuckster
 
Posts: 22
Joined: Wed Jun 10, 2009 11:29 pm
Location: Maleny, Australia

Re: OCS Plugin: Static Pages

Postby jmacgreg » Thu Aug 27, 2009 2:22 pm

Hi Charles,

Just verified this and posted a bug report: http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=4690. There's a fix listed there as well, although perhaps a bit obtuse. You should be able to fix the path problem by opening plugings/generic/staticPages/StaticPagesEditForm.inc.php, and adding

Code: Select all
relative_urls : false,


To the TinyMCE script code. In the OJS CVS version of this page, the script starts on line 99, and I think the above line of code can be added almost anywhere within that code block (although I added it just after "mode : textareas,").

This should be fixed in upcoming versions of OCS and OJS. Let us know if you're still having problems!

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: OCS Plugin: Static Pages

Postby ddhoray » Wed Dec 01, 2010 12:47 pm

Hi,
Once the pages are created, how can we create a menu link to the page?
For example, the page i created is for 'Accommodation' and would like to put this in a menu somewhere.
ddhoray
 
Posts: 1
Joined: Mon Nov 29, 2010 8:16 am

Re: OCS Plugin: Static Pages

Postby jmacgreg » Tue Dec 07, 2010 4:56 pm

Hi ddhoray,

You can add items to the menu bar in Website Management Step 3.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: OCS Plugin: Static Pages

Postby mendesrocha » Mon Jan 17, 2011 7:30 pm

Hello!

Since I upgraded my OCS from 2.1.1.2 to 2.3.3.1 my static pages plugin is not working.

I can access the plugin webpage, create and edit static pages. But, when I try to view the page I have created, the OCS returns the following error:

Fatal error: import() [function.require]: Failed opening required 'core/Handler.inc.php' (include_path='.:/home/cbce/public_html/congressos/classes:/home/cbce/public_html/congressos/pages:/home/cbce/public_html/congressos/lib/pkp:/home/cbce/public_html/congressos/lib/pkp/includes:/home/cbce/public_html/congressos/lib/pkp/classes:/home/cbce/public_html/congressos/lib/pkp/pages:/home/cbce/public_html/congressos/lib/pkp/lib/adodb:/home/cbce/public_html/congressos/lib/pkp/lib/phputf8:/home/cbce/public_html/congressos/lib/pkp/lib/pqp/classes:/home/cbce/public_html/congressos/lib/pkp/lib/smarty:.:/usr/share/pear') in /home/cbce/public_html/congressos/lib/pkp/includes/functions.inc.php on line 25


Does anyone know what is happening? Does staticPages works on OxS 2.3 versions?
mendesrocha
 
Posts: 174
Joined: Mon Nov 05, 2007 11:10 am
Location: Brazil

Re: OCS Plugin: Static Pages

Postby mcrider » Fri Jan 21, 2011 5:44 pm

Hi mendesrocha,

Are you using the same plugin as posted on this forum thread? The error you're getting implies you're trying to use old code (the Handler file has been moved to the classes/handler/ directory). The static pages plugin now ships with OCS and should work with your 2.3.3.1 release. I suggest downloading an official copy of OCS and replacing the static pages plugin you have in your current OCS install with the official version.

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: OCS Plugin: Static Pages

Postby mendesrocha » Fri Jan 21, 2011 6:24 pm

Hi Matt,

Thanks for the tip.

Indeed, the staticPage weren't patched during the upgrade, since I found lots of .orig and .rej files in the directory.

I just moved an original folder to my installation and it is working.

Thank's again!
mendesrocha
 
Posts: 174
Joined: Mon Nov 05, 2007 11:10 am
Location: Brazil

PreviousNext

Return to Plugin Gallery

Who is online

Users browsing this forum: No registered users and 0 guests