Giter Club home page Giter Club logo

ojs-fiduswriter's Introduction

OJS-FidusWriter

OJS-FidusWriter is an Open Journal Systems (OJS) plugin to connect an OJS instance with Fidus Writer to from an integrated publishing system. This plugin has to be combined with the FidusWriter-OJS plugin for Fidus Writer.

Project page: https://www.fiduswriter.org/ojs-integration/

Installation:

  1. Follow the instructions for the FidusWriter-OJS plugin to install Fidus Writer and the connector on the Fidus Writer side: https://github.com/fiduswriter/fiduswriter-ojs

  2. Install OJS

To install OJS please follow the instructions at https://github.com/pkp/ojs/ . Check out a version that is compatible with the plugin - preferably an LTS release.

  1. Make sure that you have the curl extension for PHP installed on the sevrer that is running OJS. On Ubuntu that can be done for example with:
sudo apt install php8.1-curl
  1. Setup at least two journals on the OJS instance

This step is required to make the global settings show in the OJS menus.

  1. Download plugin files

Download and copy the plugin files from github into plugins/generic/fidusWriter inside your OJS folder. Create the folder if it does not exist. You can achieve this by running these commands:

cd plugins/generic/
git clone https://github.com/fiduswriter/ojs-fiduswriter.git fidusWriter
cd ../..
  1. Register plugin with OJS by running:
php lib/pkp/tools/installPluginVersion.php plugins/generic/fidusWriter/version.xml
  1. Activate plugin in OJS

Enable the plugin via the OJS website interface:

Open the OJS interface and select "ENABLE" under the settings "Fidus Writer Integration Plugin" under the following routes:

setting > website > plugins

  1. Configure the API key in OJS

Come up with an API Key to allow secure communications between Fidus Writer and OJS. This is just a single long text string that you should not share with anyone that will need to be entered in the configurations of Fidus Writer and OJS. Be cautious: The key allows automatic login into Fidus Writer and OJS in various ways, so do not share it!

To set the key in OJS, go to the settings of the Fidus Writer integration plugin under the following routes:

setting > website > plugins -> Fidus Writer Integration plugin (triangle to left) -> Settings -> Enter API key -> Save.

  1. Activate connection on Fidus Writer side

Enter the administration interface at your Fidus Writer installation (http://myserver.com/admin).

In the section "Custom views" click on "Register journal". Enter the URL and API Key (from step 4) of your OJS installation.

Install OJS on NGINX

If you need to install OJS on the same server as Fidus Writer, it may make sense to install both behind NGINX. A site cofniguration file an OJs instance could be initially be configured like this (before obtaining an SSL certificate using certbot --nginx):

server {
  listen 80;
  listen [::]:80;
  server_name OJS.DOMAIN.COM;
  root /var/www/ojs/;

  index index.php index.html index.htm;


  location / {
    try_files $uri $uri/ /index.php$uri?$args;
  }

  location ~ ^(.+\.php)(.*)$ {
    set $path_info $fastcgi_path_info;
    fastcgi_split_path_info ^(.+\.php)(.*)$;
    fastcgi_param PATH_INFO $path_info;
    fastcgi_param PATH_TRANSLATED $document_root$path_info;
    fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
    fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
  }

  location ~ /\.ht {
    deny all;
  }
}

Credits

This plugin was originally developed by the Opening Scolarly Communications in the Social Sciences (OSCOSS) project in 2017, financed by the German Research Foundation (DFG) and executed by the University of Bonn and GESIS โ€“ Leibniz Institute for the Social Sciences. In 2021-2022, development has been financed through the Cluster of Excellence ROOTS at Kiel University.

License

This software is released under the the GNU General Public License v2.0.

See the file License.md included with this distribution for the terms of this license.

Third parties are welcome to modify and redistribute the plugin in entirety or parts according to the terms of this license. We also welcome patches for improvements or bug fixes to the software.

ojs-fiduswriter's People

Contributors

afshinsadeghi avatar jobdiogenes avatar johanneswilm avatar nmueller18 avatar s6fikass avatar t10967 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

ojs-fiduswriter's Issues

OJS 3.2

Considering that OJS is already at 3.2, are there any tests available if the current plugin-version is compatible to 3.2?

"http" instead of "https" during submission process

During submission via Fiduswriter to OJS, two rows are added to the backend-MySQL-table "submission_settings" that handle the communication between FW and OJS. It appears that in the row for the address of the FW-server, the URL erroneously starts with "http:". This leads to an error 500 when clicking on the Fiduswriter-link in OJS. If changed manually to "https:", everything works as expected. The error might also originate in the fiduswriter-ojs-plugin.

Settings error: filemtime(): stat failed for

On OJS 3.1.2.4, opening the settings of OJS-Fiduswriter 1.3.1.0 throws the error Failed Ajax request or invalid JSON returned.
The obviously related PHP warnings are given below. Similar error messages are reported from other OJS-plugins, so the issue seems related to the construction of paths:
ajnyga/embedGalley#6
ulsdevteam/pkp-formHoneypot#3

PHP Warning: filemtime(): stat failed for lib/pkp/templates/plugins/generic/fidusWriter/templatestemplates/settingsForm.tpl in /www/user/htdocs_ojs/lib/pkp/classes/template/PKPTemplateResource.inc.php on line 51 PHP Stack trace: PHP 1. {main}() /www/user/htdocs_ojs/index.php:0 PHP 2. Application->execute() /www/user/htdocs_ojs/index.php:68 PHP 3. Dispatcher->dispatch() /www/user/htdocs_ojs/lib/pkp/classes/core/PKPApplication.inc.php:252 PHP 4. PKPComponentRouter->route() /www/user/htdocs_ojs/lib/pkp/classes/core/Dispatcher.inc.php:134 PHP 5. PKPComponentRouter->_authorizeInitializeAndCallRequest() /www/user/htdocs_ojs/lib/pkp/classes/core/PKPComponentRouter.inc.php:257 PHP 6. SettingsPluginGridHandler->manage() /www/user/htdocs_ojs/lib/pkp/classes/core/PKPRouter.inc.php:390 PHP 7. FidusWriterPlugin->manage() /www/user/htdocs_ojs/lib/pkp/classes/controllers/grid/plugins/PluginGridHandler.inc.php:234 PHP 8. FidusWriterSettingsForm->fetch() /www/user/htdocs_ojs/plugins/generic/fidusWriter/FidusWriterPlugin.inc.php:124 PHP 9. FidusWriterSettingsForm->fetch() /www/user/htdocs_ojs/plugins/generic/fidusWriter/FidusWriterSettingsForm.inc.php:66 PHP 10. TemplateManager->fetch() /www/user/htdocs_ojs/lib/pkp/classes/form/Form.inc.php:200 PHP 11. TemplateManager->fetch() /www/user/htdocs_ojs/lib/pkp/classes/template/PKPTemplateManager.inc.php:770 PHP 12. TemplateManager->_execute() /www/user/htdocs_ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:116 PHP 13. TemplateManager->createTemplate() /www/user/htdocs_ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:189 PHP 14. Smarty_Internal_Template->__construct() /www/user/htdocs_ojs/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php:1029 PHP 15. Smarty_Template_Source::load() /www/user/htdocs_ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:168 PHP 16. PKPTemplateResource->populate() /www/user/htdocs_ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_source.php:182 PHP 17. PKPTemplateResource->fetchTimestamp() /www/user/htdocs_ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_resource_custom.php:52 PHP 18. filemtime() /www/user/htdocs_ojs/lib/pkp/classes/template/PKPTemplateResource.inc.php:51 PHP Fatal error: Uncaught --> Smarty: Unable to load template 'app:plugins/generic/fidusWriter/templatestemplates/settingsForm.tpl' <-- thrown in /www/user/htdocs_ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php on line 195

Notification error

With OJS 3.1.2.4, the NotificationManager throws the fatal error below in the communication between Fiduswriter and OJS. It seems that the ContextId (= journalId) is transmitted as string instead as integer as probably requested by OJS (see third line of code).

web04 php73-user: PHP Fatal error:  Uncaught TypeError: Argument 1 passed to NotificationManagerDelegate::createNotification() must be an instance of PKPRequest, instance of MockObject given, called in /www/user/htdocs_ojs/lib/pkp/classes/notification/managerDelegate/PKPApproveSubmissionNotificationManager.inc.php on line 90 and defined in /www/user/htdocs_ojs/lib/pkp/classes/notification/NotificationManagerDelegate.inc.php:59
web04 php73-user: Stack trace:
web04 php73-user: #0 /www/user/htdocs_ojs/lib/pkp/classes/notification/managerDelegate/PKPApproveSubmissionNotificationManager.inc.php(90): NotificationManagerDelegate->createNotification(Object(MockObject), NULL, 16777243, '2', 1048585, 233, 2)
web04 php73-user: #1 /www/user/htdocs_ojs/lib/pkp/classes/notification/PKPNotificationManager.inc.php(345): PKPApproveSubmissionNotificationManager->updateNotification(Object(MockObject), NULL, 1048585, 233)
php73-user: #2 /www/user/htdocs_ojs/plugins/generic/fidusWriter/FidusWriterGatewayPlugin.inc.php(555): PKPNotificationManager->updateNotification(Object(MockObject), Array, NULL, 1048585, 23 in /www/user/htdocs_ojs/lib/pkp/classes/notification/NotificationManagerDelegate.inc.php on line 59

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.