URGENT: After doing a git pull, my OJS installation is broken

After I did a git pull to update, this loading indicator showed up on all pages of the Dashboard, and never goes away: http://puu.sh/rvBwM/e3bcf34cbd.png

Also, whenever I open a page such as Submissions or Users, I get this error: {“status”:true,“content”:"\n\n\t\t\tHelp\n\t</a>\n\n\n\n

This is urgent, as my journal starts accepting submissions for its next issue on Wednesday…

EDIT: Getting this error in Firebug: TypeError: $(…).pkpHandler is not a function

Hi @Luke_Scicluna,

Did you ensure that your application’s repository is using the same branch as the submodule in lib/pkp? Did you change from one branch to another, and if so, which branches?

Alec Smecher
Public Knowledge Project Team


This is the exact error that was solved in my case simply by cleaning my browsers cache and OJS cache. Of course your case could be different.

Same branch - git pull origin master.

Thanks, I noticed your fix. Unfortunately it did not work.

Hi @Luke_Scicluna,

Have you checked your PHP error log?

Alec Smecher
Public Knowledge Project Team

No errors seem to be logged in the php_errorlog in public_html/, and there isn’t one in the OJS root.

Ok, too bad. This just all fits the problem I had. I had the exact error in firebug and no errors in php error log.

It would be really odd for the php error log to be exposed in a Web accessible location like public_html or the OJS root. What server are you running under? For example, RHEL would place the error log in /var/log/httpd/.

What is the output of a git status and git remote -v?

CentOS, but I cannot access /var because I’m on shared hosting and it’s not permitted.

Git Status: Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)

        modified:   .openshift/action_hooks/deploy
        modified:   cache/.gitignore
        modified:   cache/_db/.gitignore
        deleted:    cache/t_cache/.gitignore
        deleted:    cache/t_compile/.gitignore
        modified:   cache/t_config/.gitignore
        modified:   config.TEMPLATE.inc.php
        modified:   docs/dev/doxygen-input-filter.php
        modified:   index.php
        modified:   lib/pkp (new commits, modified content, untracked content)
        modified:   locale/ca_ES/default.xml
        modified:   locale/es_AR/admin.xml
        modified:   locale/es_AR/author.xml
        modified:   locale/es_AR/default.xml
        modified:   locale/es_AR/editor.xml
        modified:   locale/es_AR/locale.xml
        modified:   locale/es_AR/manager.xml
        modified:   locale/ml_IN/admin.xml
        modified:   locale/ml_IN/author.xml
        modified:   locale/ml_IN/default.xml
        modified:   locale/ml_IN/editor.xml
        modified:   locale/ml_IN/emailTemplates.xml
        modified:   locale/ml_IN/locale.xml
        modified:   locale/ml_IN/manager.xml
        modified:   locale/pl_PL/admin.xml
        modified:   locale/pl_PL/author.xml
        modified:   locale/pl_PL/default.xml
        modified:   locale/pl_PL/editor.xml
        modified:   locale/pl_PL/locale.xml
        modified:   locale/pl_PL/manager.xml
        modified:   locale/sr_SR/locale.xml
        modified:   plugins/generic/backup/index.tpl
        modified:   plugins/generic/browse/locale/de_DE/locale.xml
        modified:   plugins/generic/driver/locale/de_DE/locale.xml
        modified:   plugins/generic/googleAnalytics (modified content)
        modified:   plugins/generic/lensGalley (new commits)
        modified:   plugins/generic/lucene/embedded/bin/check.bat
        modified:   plugins/generic/lucene/embedded/bin/check.sh
        modified:   plugins/generic/lucene/embedded/bin/chkconfig.bat
        modified:   plugins/generic/lucene/embedded/bin/chkconfig.sh
        modified:   plugins/generic/lucene/embedded/bin/load.sh
        modified:   plugins/generic/lucene/embedded/bin/pull.sh
        modified:   plugins/generic/lucene/embedded/bin/script-startup
        modified:   plugins/generic/lucene/embedded/bin/script-startup.bat
        modified:   plugins/generic/lucene/embedded/bin/start.bat
        modified:   plugins/generic/lucene/embedded/bin/start.sh
        modified:   plugins/generic/lucene/embedded/bin/stop.bat
        modified:   plugins/generic/lucene/embedded/bin/stop.sh
        modified:   plugins/generic/lucene/embedded/etc/pull.conf
        modified:   plugins/generic/lucene/tests/functional/FunctionalLucenePluginSearchTestCase.php
        modified:   plugins/generic/staticPages (modified content)
        modified:   plugins/generic/translator (new commits, modified content)
        modified:   plugins/importexport/crossref/locale/es_AR/locale.xml
        modified:   plugins/importexport/datacite/locale/es_AR/locale.xml
        modified:   plugins/importexport/doaj/locale/es_AR/locale.xml
        modified:   plugins/importexport/doaj/locale/pl_PL/locale.xml
        modified:   plugins/importexport/medra/locale/es_AR/locale.xml
        modified:   plugins/importexport/medra/tests/classes/MedraWebserviceTest.php
        modified:   plugins/importexport/medra/tests/classes/O4DOIObjectCacheTest.inc.php
        modified:   plugins/importexport/pubIds/index.php
        modified:   plugins/importexport/pubIds/locale/de_DE/locale.xml
        modified:   plugins/importexport/pubIds/locale/en_US/locale.xml
        modified:   plugins/importexport/pubIds/version.xml
        modified:   plugins/metadata/dc11/tests/Dc11MetadataPluginTest.php
        modified:   plugins/metadata/mods34/tests/Mods34MetadataPluginTest.php
        modified:   plugins/metadata/nlm30/tests/Nlm30MetadataPluginTest.php
        modified:   plugins/metadata/openurl10/tests/Openurl10MetadataPluginTest.php
        modified:   plugins/oaiMetadataFormats/dc/tests/OAIMetadataFormat_DCTest.php
        modified:   plugins/pubIds/doi/DOIPubIdPlugin.inc.php
        modified:   plugins/pubIds/doi/index.php
        modified:   plugins/pubIds/doi/locale/de_DE/locale.xml
        modified:   plugins/pubIds/doi/locale/en_US/locale.xml
        modified:   plugins/pubIds/doi/templates/settingsForm.tpl
        modified:   plugins/pubIds/doi/version.xml
        modified:   plugins/pubIds/urn/URNPubIdPlugin.inc.php
        modified:   plugins/pubIds/urn/index.php
        modified:   plugins/pubIds/urn/locale/de_DE/locale.xml
        modified:   plugins/pubIds/urn/locale/en_US/locale.xml
        modified:   plugins/pubIds/urn/templates/settingsForm.tpl
        modified:   plugins/pubIds/urn/version.xml
        modified:   tests/plugins/importexport/PubObjectCacheTest.php
        modified:   tools/buildpkg.sh
        modified:   tools/release.sh
        modified:   tools/startSubmodulesTRAVIS.sh

Untracked files:
  (use "git add <file>..." to include in what will be committed)


git remote -v: origin https://github.com/pkp/ojs.git (fetch) origin https://github.com/pkp/ojs.git (push)

Do you know why there are some many modified files in your install? Especially odd is the lib/pkp submodule’s modified and untracked content.

Maybe because it’s an upgrade from OJS 2.4?

I would strongly recommend a fresh git clone and checkout of ojs-stable-3_0_0. If you are not familiar with the changes, they shouldn’t be there.

Also, when on a shared server with multiple virtualhosts, the system administrator will usually setup your apache access and error logs to be accessible outside of the default CentOS location. Check with your sysadmin on if this has been or can be setup. Availability of the logs will make your troubleshooting so much easier.

Wouldn’t this lose the settings and data imported from OJS 2.4 when I upgraded?

Will attempt to do so.

Your OJS install consists of three parts:

  1. The OJS source files (what you would download via git or a tgz)
  2. The OJS data files (this live in files_dir and public)
  3. The OJS database

It is important to know this structure as you perform your regular backups.

The settings and data are held in the data files and in the database. The source files are what are tracked by git, and these can be changed without data loss, provided you also accompany the change of the source with running the upgrade script to make any needed datafile/database changes with an upgrade.

If you refresh the OJS source files, change the file permissions appropriately, and follow the UPGRADE documentation, you won’t lose settings and data. In your particular case, unless the initial run of the 3.0 upgrade failed, or unless the you are re-upgrading from 2.4.x, you don’t need to re-run the upgrade script.

Is there a git command that I can use to do this?

Something like this should come pretty close:

git reset --hard ojs-stable-3_0_0
git clean -df
git submodule update --init --recursive

The problem then is that you might still have local modifications to your submodules.

cd lib/pkp
git reset --hard ojs-stable-3_0_0
git clean -df
git submodule update --init --recursive

You will probably then need to rerun composer from the lib/pkp directory. I haven’t actually tested this, and I’ve had personal frustrations with the git clean command in the past.


This worked. Thank you ever so much.