Running production OJS site with Git for Dummies (like me)

Just to clarify, you should NOT run npm run dev in a production install. It should only be run when developing, and only when you’re modifying the core JS files (any JS files that aren’t theming, basically).

Whenever managing a production install, npm run build will create the necessary JS files, and will minify them to improve load times.

@marc since a lot of people may be just scanning this thread, would you mind updating your previous post? Normally it wouldn’t be a big deal, but npm run dev will build a massive, multi-mb JS file with hot reload and basically slow everything down on the backend. :slight_smile:

1 Like

Hi Nate,

Of course I don’t mind (it’s done), but may be is a good idea talking to @ajnyga to modify the initial post facilitate future readers’ live?

Cheers,
m.

1 Like

It seems that I can not edit the original post anymore. There is maybe a time limit for editing posts for regular users?

Hi @ajnyga , please could you write just the exact statement for OJS 3.1.2 stable branch for me? I am not a developer, don’t understand from some ojs stable branch etc?
Instead of;
git checkout ojs-some-stable-branch
what should I write for stable-3_1_2
That may help me a lot.
Regards,

the latest is ojs-stable-3_1_1

Hi @ajnyga,
Thank you for your support. By the way, the site for php pear http://pear.php.net was down for a few days, and today I see an important notice on their site. They say;
PEAR server is down

A security breach has been found on the http://pear.php.net webserver, with a tainted go-pear.phar discovered. The PEAR website itself has been disabled until a known clean site can be rebuilt. A more detailed announcement will be on the PEAR Blog once it’s back online.

If you have downloaded this go-pear.phar in the past six months, you should get a new copy of the same release version from GitHub (pear/pearweb_phars) and compare file hashes. If different, you may have the infected file.
I tried to create a go-pear.phar from github pear-core, but I could not.
So, I have to wait a little more, I think. Besides, NodeJs and other issues, the last problem completely stopped my progress.
Best Regards,
Ugur
12

Hi, at the end of the step;
npm install
I get an error and the installation fails.
A screenshot and log file is attached.
Hosting env is Apache 2.2.31 and php 7.2.11,
09

nmp debug log is here;
http://upgrade.adlitipbulteni.com/npm-debug.log

When I go on with npm run build, I get new errors and installation fails.

A screenshot is attached .
09
Hope We can find a solution,
Best Regards,
Ugur Kocak

But at the end of all, the installation took place with success.
OJS 3.2.0 installed on my test portal.
Of course, I need to perform an upgrade, not a clean install.
May I perform the same procedure on live site and use it?
Best regards,
Ugur

Hi @drugurkocak,

Note that OJS 3.2.0 is not yet released and you’re very likely to run into problems. I’d strongly suggest using one of the stable branches – ojs-stable-3_1_1. The ojs-stable-3_1_2 branch is close enough to being released that you may find it usable too.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher
I once again want to thank you and other members of OJS team for their valuable efforts.
It’s has been almost five years we had installed and started to use OJS, and got your support whenever we face to problem. I sincerely say that, you are doing a really good job. OJS (and others like OMP, OCP) also works as much as thousands of dollars worth of programs. You hear our voice. Thanks to OJS team we can share my problems with and get support from you. :+1:

To the other matter related to GitHub install, I know that I have to read and learn about the use of Git.
I have an already running site with OJS 3.1.2 released on June 30, 2018.
I made all my upgrades on my local computer since shared hosting kills my processes when resource limits are reached. I noticed that many of the errors that occurred when dealing with our journal were caused by this reason [upgrade via web page etc]. So, we moved to a VPS, and will try to upgrade via git method.
Best Regards,

1 Like

Hi, @asmecher
I have come a little distance by reading a lot about git and github, and get partial success on installation via github. I need a short answer on submodule update;

To install the dependencies, run…
cd lib/pkp
composer update
cd …/…
cd plugins/paymethod/paypal
composer update
cd …/…/…
cd plugins/generic/citationStyleLanguage
composer update
cd …/…/…
All done!

I am not sure whether it’s all that, or I should repeat this procedure for all submodules listed during submodule update such as;

Submodule ‘docs/manual’ (GitHub - pkp/ojs-user-guide: OJS User Guide) registered for path ‘docs/manual’
Submodule ‘lib/pkp’ (GitHub - pkp/pkp-lib: The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.) registered for path ‘lib/pkp’
Submodule ‘lib/ui-library’ (GitHub - pkp/ui-library: Design pattern and component library for Public Knowledge Project's applications) registered for path ‘lib/ui-library’
Submodule ‘plugins/blocks/makeSubmission’ (GitHub - pkp/makeSubmission: A sidebar block plugin for Open Journal Systems and Open Monograph Press which adds a link to the submissions page.) registered for path ‘plugins/blocks/makeSubmission’
Submodule ‘plugins/generic/citationStyleLanguage’ (GitHub - pkp/citationStyleLanguage: An OJS 3 plugin to generate an article citation in any CSL citation style using citeproc-php.) registered for path ‘plugins/generic/citationStyleLanguage’
Submodule ‘plugins/generic/customBlockManager’ (GitHub - pkp/customBlockManager: Plugin permitting the creation of custom sidebar blocks) registered for path ‘plugins/generic/customBlockManager’
Submodule ‘plugins/generic/googleAnalytics’ (GitHub - pkp/googleAnalytics: Google Analytics plugin for OMP 1.2+ / OJS 3.0+) registered for path ‘plugins/generic/googleAnalytics’
Submodule ‘plugins/generic/lensGalley’ (GitHub - asmecher/lensGalley: Galley viewer plugin integrating eLife Lens for OJS 3.0) registered for path ‘plugins/generic/lensGalley’
Submodule ‘plugins/generic/orcidProfile’ (GitHub - pkp/orcidProfile: A plugin to pull ORCID information into a PKP user profile) registered for path ‘plugins/generic/orcidProfile’
Submodule ‘plugins/generic/pdfJsViewer’ (GitHub - pkp/pdfJsViewer: A pdf.js-based PDF viewer for OJS articles and issue galleys.) registered for path ‘plugins/generic/pdfJsViewer’
Submodule ‘plugins/generic/staticPages’ (GitHub - pkp/staticPages: Plugin permitting the creation of static pages like a CMS (OJS 3.0+ and OMP 1.1.1+)) registered for path ‘plugins/generic/staticPages’
Submodule ‘plugins/generic/tinymce’ (GitHub - pkp/tinymce: TinyMCE plugin for OJS 3.x and OMP 1.2+) registered for path ‘plugins/generic/tinymce’
Submodule ‘plugins/generic/translator’ (GitHub - pkp/translator: PKP Translator plugin for OMP 1.1.1+ and OJS 3.0+) registered for path ‘plugins/generic/translator’
Submodule ‘plugins/reports/counter/classes/COUNTER’ (GitHub - ulsdevteam/COUNTER: A PHP Class wrapper of DOMDocument for the COUNTER standard (http://www.projectcounter.org).) registered for path ‘plugins/reports/counter/classes/COUNTER’
Submodule ‘plugins/reports/reviewReport’ (GitHub - pkp/reviewReport: Review report plugin for OMP/OJS) registered for path ‘plugins/reports/reviewReport’

Should I repeat the composer update procedure for each of the submodules listed above?
Best regards,
Ugur Kocak

Hi @drugurkocak,

The short list is all that’s required at the moment.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hi @asmecher
Thank you very much for your support.

I checked out and used ojs-stable-3_1_1 branch.
I noticed that; It works perfect when I start from scratch by creating a new journal. But I get empty tabs when I change install status to off, and upgrade existing database via web interface (from 3.1.1.2)… Although it says “upgraded to ojs 3.1.14 successfully”, the tabs were empty. Server specs: Apache/2.4.38 (Unix) PHP/7.2.15, MySQL Server version: 8.0.15 - Homebrew.

The only fatal error in php error log was related to missing files in nlm30 folder. When I replaced missing files, functions run normally, and internal server errors have gone.

`PHP Fatal error:  require_once(): Failed opening required '/Users/.../Sites/adlitipbulteni.local/lib/pkp/plugins/metadata/nlm30/filter/Nlm30CitationSchemaCitationAdapter.inc.php`

In order to take a screenshot of empty tabs (admin panel), I deleted and reinstalled everything, then upgraded. This time, all the tabs appear normally, even The current role does not have access to this operation error in that post was fixed and I can download the files now.

I hope, I can get same success on journals web site.

Thank you very much,
Best Regards,
Ugur Kocak

2019/02/19 → :+1::+1::+1: