OJS: broken database, users unable to connect

I have tried to migrate OJS from 2.4.5 to 2.4.7. I have run php tools/upgrade.php upgrade. Since then, people are unable to connect to the system.

The journal I work for uses some slightly modified scripts and templates but none of them are connected to users. I have experienced some errors with upgrade tool due to missing scripts or bad links. Now files and scripts are up to date but the upgrade tool does not output anything.

I have tried to ask first on GitHub and Clinton Graham told me my database structure was not correct and that it was better to ask for help here.
mysql> describe users;
±---------------------±-------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±---------------------±-------------±-----±----±--------±---------------+
| user_id | bigint(20) | NO | PRI | NULL | auto_increment |
| username | varchar(32) | NO | UNI | NULL | |
| password | varchar(40) | NO | | NULL | |
| salutation | varchar(40) | YES | | NULL | |
| first_name | varchar(40) | NO | | NULL | |
| middle_name | varchar(40) | YES | | NULL | |
| last_name | varchar(90) | NO | | NULL | |
| gender | varchar(1) | YES | | NULL | |
| initials | varchar(5) | YES | | NULL | |
| email | varchar(90) | NO | UNI | NULL | |
| url | varchar(255) | YES | | NULL | |
| phone | varchar(24) | YES | | NULL | |
| fax | varchar(24) | YES | | NULL | |
| mailing_address | varchar(255) | YES | | NULL | |
| country | varchar(90) | YES | | NULL | |
| locales | varchar(255) | YES | | NULL | |
| date_last_email | datetime | YES | | NULL | |
| date_registered | datetime | NO | | NULL | |
| date_validated | datetime | YES | | NULL | |
| date_last_login | datetime | NO | | NULL | |
| must_change_password | tinyint(4) | YES | | NULL | |
| auth_id | bigint(20) | YES | | NULL | |
| auth_str | varchar(255) | YES | | NULL | |
| disabled | tinyint(4) | NO | | 0 | |
| disabled_reason | text | YES | | NULL | |
| suffix | varchar(40) | YES | | NULL | |
| billing_address | varchar(255) | YES | | NULL | |
| inline_help | tinyint(4) | YES | | NULL | |
±---------------------±-------------±-----±----±--------±---------------+
28 rows in set (0.00 sec)

as I said, there is no other output I can post.

Any idea? Any parameter I could use to figure out what happened with upgrade tool? Unfortunately I don’t have any log file where I could find previous messages.

Hi @sebastien,

The issue you’re referring to is here:

From what you’re describing, it sounds like the upgrade process failed. Without the output from the upgrade tool, we have no way of knowing where the upgrade failed.

The best solution is to restore from a backup made before upgrading, then try the upgrade, and post the results here.

Regards,
Alec Smecher
Public Knowledge Project Team

I have tried to restore the oldest table version I had at hand, but result is the same. I will try to get an older backup from my hosting company, but I don’t know if they have old backups. I have not been very cautious, my mistake :frowning: . It would be nice if I can have a list of database structure modifications between 2.4.5 and 2.4.7 and a way to update password encryption.

Thanks

Did you restore just the users table, or did you restore the whole database? Restoring the whole database would be recommended.

The database schema is stored in
ojs/dbscripts/xml at ojs-stable-2_4_7 · pkp/ojs · GitHub (OJS specific)
and
pkp-lib/xml/schema at ojs-stable-2_4_7 · pkp/pkp-lib · GitHub (common library)

You could compare those trees between 2.4.5 and 2.4.7 to see the differences, but the upgrade process is designed to do that for you.

With the 2.4.7 upgrade, password encryption should be updated on-the-fly from the old md5 or sha1 hashes. See Security issue: various flaws with password hashes and reset · Issue #695 · pkp/pkp-lib · GitHub for details.

I have tried to restore the oldest database I had, but it did not help. Upgrade script did not output anything.

Is there a simple way to force database upgrade process and to upgrade passwords?

Thanx

UP: I have tried upgrade.php check and it outputs correctly that I need to upgrade from 2.4.5 to 2.4.7.1.

Then I tried to insert traces in lib/pkp/classes/cliTool/UpgradeTool.inc.php

It appears that in method upgrade() the process fails before

$installer = new Upgrade(array());
$installer->setLogger($this);

it seems that constructors fail to init. files in dbscripts/xml are:

indexes.xml install.xml ojs_schema.xml ojs_schema_stage1.xml upgrade upgrade.xml version.xml

in upgrade subdirectory:
2.0.1_update.xml 2.4.0_idupgrade_supp_files.xml 2.0.2_preupdate.xml 2.4.0_notifications.xml 2.0.2_update.xml 2.4.0_notifications2.xml 2.1.0_update.xml 2.4.0_postCounterMigration.xml 2.1.1_update.xml 2.4.0_postTimedViewsMigration.xml 2.2.0_localize.xml 2.4.0_postUsageStatsMigration.xml 2.2.0_preupdate.xml 2.4.0_postUsageStatsMigration_issueGalleys.xml 2.2.0_update.xml 2.4.0_preupdate_article_files.xml 2.2.0_usersettings.xml 2.4.0_preupdate_emaillog.xml 2.2.0_usersettings2.xml 2.4.0_preupdate_reviewrounds.xml 2.2.1_preupdate.xml 2.4.0_preupdate_usageStatistics.xml 2.2.1_update.xml 2.4.0_preupdate_usageStatistics_issueGalleys.xml 2.2.1_usersettings.xml 2.4.0_update.xml 2.2.3_update.xml 2.4.2_remove_submission_tombstones.xml 2.3.0_preupdate.xml 2.4.2_update.xml 2.3.0_subscription_ip.xml 2.4.3_postCounterMigration.xml 2.3.0_subscription_ip2.xml 2.4.3_postTimedViewsMigration.xml 2.3.0_update.xml 2.4.3_postUsageStatsMigration.xml 2.3.0_usersettings.xml 2.4.3_postUsageStatsMigration2.xml 2.3.3_preaffiliations1.xml 2.4.3_preupdate_usageStatistics.xml 2.3.3_preaffiliations2.xml 2.4.3_preupdate_usageStatistics2.xml 2.3.3_preupdate1.xml 2.4.4_update.xml 2.3.3_preupdate2.xml 3.0.0_adaptBooksForReview.xml 2.3.3_preupdate3.xml 3.0.0_adaptReferrals.xml 2.3.3_update.xml 3.0.0_adaptTimedViews.xml 2.3.4_update.xml 3.0.0_change_assoc_type.xml 2.3.5_update.xml 3.0.0_change_assoc_type_metrics.xml 2.3.7_update.xml 3.0.0_postSubmissionFilesMigration.xml 2.4.0_idupgrade_article_galleys.xml 3.0.0_preupdate.xml 2.4.0_idupgrade_article_galleys2.xml 3.0.0_settings.xml 2.4.0_idupgrade_articles.xml 3.0.0_update.xml 2.4.0_idupgrade_issues.xml public_issue_ids.xml 2.4.0_idupgrade_published_articles.xml remove_timed_views_bots.xml

I notice there is no file about 2.4.5, as it seemed to be expected in file upgrade.xml

maybe I have forgot to apply a pactch, or it failed? any other idea?

Hi @sebastien,

To make sure you aren’t missing files, I’d suggest trying the “full package upgrade” process described in the upgrade documentation.

Regards,
Alec Smecher
Public Knowledge Project Team

I have installed file ojs-2.4.7-1.tar.gz

Then I have modified config.inc.php by adding a salt string as recommended in release notes README-2-4-7

I have applied a patch which modifies some features needed by editors of the journal I work for (see next post)

Results are just below.

It seems that everything worked find.

But I still cannot log in with my credentials not with a colleague’s ones.

Any idea?

`------------- result ----------------------------

Code version: 2.4.7.1
Database version: 2.4.5.0
Latest version: 2.4.7.1
Database version is older than code version
Run “tools/upgrade.php upgrade” to update
[pre-install]
[load: upgrade.xml]
[version: 2.4.7.1]
[schema: lib/pkp/xml/schema/signoff.xml]
[schema: lib/pkp/xml/schema/common.xml]
[schema: lib/pkp/xml/schema/groups.xml]
[schema: lib/pkp/xml/schema/log.xml]
[schema: lib/pkp/xml/schema/announcements.xml]
[schema: lib/pkp/xml/schema/scheduledTasks.xml]
[schema: lib/pkp/xml/schema/temporaryFiles.xml]
[schema: lib/pkp/xml/schema/metadata.xml]
[schema: lib/pkp/xml/schema/reviews.xml]
[schema: lib/pkp/xml/schema/reviewForms.xml]
[schema: lib/pkp/xml/schema/controlledVocab.xml]
[schema: lib/pkp/xml/schema/submissions.xml]
[schema: lib/pkp/xml/schema/comments.xml]
[schema: lib/pkp/xml/schema/notes.xml]
[schema: lib/pkp/xml/schema/gifts.xml]
[schema: lib/pkp/xml/schema/mutex.xml]
[schema: lib/pkp/xml/schema/tombstone.xml]
[schema: lib/pkp/xml/schema/metrics.xml]
[schema: dbscripts/xml/ojs_schema.xml]
[data: dbscripts/xml/indexes.xml]

[code: Installer Installer::localizeCustomBlockSettings]

[code: Installer Installer::removeCustomIdentifierSuffixOption]
[note: docs/release-notes/README-2.4.6]

[code: Installer Installer::deleteOrphanedCompletedPayments]
[note: docs/release-notes/README-2.4.7]
[note: docs/release-notes/README-BEACON]

[code: Installer Installer::addPluginVersions]
[post-install]

Release Notes

OJS 2.4.6 Release Notes
GIT tag: ojs-2_4_6-0
Release date: March 17, 2015

Note: While we transition our issue management system from Bugzilla
(http://pkp.sfu.ca/bugzilla) to Github Issues
(http://www.github.com/pkp/pkp-lib/issues), this list will contain a mixture
of IDs from both systems. Bugzilla entries will be prefixed with “bz” and
Github issues will be prefixed with “i”.

New Features

#bz8085# Make OJS more SPF-compatible in email sending
#bz8927# Add PDF.js-based PDF viewer
#bz8966# Add support for no-reply email sender address
#bz9036# Improve body ID consistency for theming
#bz9051# Add ORCiD field to QuickSubmit plugin
#i277#: CustomBlockManager-PlugIn localised

Bug Fixes

#bz6625# Add DOI year cutoff OR Crossref XML year cutoff
#bz7846# Tracking: OJS 2.4.x de_DE (German) locale fixes
#bz8356# Enabling announcements pushes 'about' menu item onto new line
#bz8747# Fatal error: Call to a member function getId() on a non-object
#bz8777# Dataverse plugin: refactor redundant code in methods to create, update studies
#bz8859# Improve copyright affixing behavior on upgrade
#bz8898# Wrong "In submission" and "In editing" count in section editor's User Home
#bz8913# Custom Theme plugin raises fatal error in Site usage
#bz8917# usageStats FileLoader reports error status due to unset return
#bz8920# Password fields should not have a maximum length
#bz8921# Some users can't login after upgrade to OJS 2.4.5
#bz8923# Call to undefined method SectionEditorSubmission::getDatePublished() in QuickSubmitForm
#bz8926# Duracloud plugin ships with .git directory
#bz8931# Site user home is missing journal listings for users associated with no journals
#bz8932# JavaScript error in user login template with implicit auth
#bz8933# signInAsUser page presents incorrect link to All Enrolled Users
#bz8934# Fix article publication date assignment on issue publish
#bz8935# Can't get additive statistics metrics
#bz8944# Reset Password Screen has typo
#bz8948# Broken links for "submission review" and "password reset" in review remind email
#bz8953# Add legacy constants used in citation assistant
#bz8956# Use random password for Shib plugin
#bz8957# Universal Analytics site id is wrapped in Smarty literal
#bz8958# Usage Stats settings form handler contains unused/unset variables
#bz8962# UsageStats COUNTER bots file not found
#bz8964# Investigate/fix layout editor proofreading
#bz8972# COUNTER report triggers PHP error
#bz8979# Remove explicit SSLv3 configuration
#bz8981# duplicate id authorBio on article landing pages when there is more than one author (xhtml violation)
#bz8983# Remove whitespace from templates prior to header.tpl being invoked
#bz8984# duplicate id="issue" on archives page makes page fail xhtml validation
#bz8985# register page duplicate id="register" (xhtml violation)
#bz8986# PublishedArticleDAO contains non-SQL quoting
#bz8988# ojs search page xhtml violation (input elements are not self closed as they should be)
#bz8989# Search page, Searchtips: <ul> nested within <p> (xhtml violation)
#bz8990# setup step5 (5.6 journal layout): table where you assign blocks to sidebars or unselected - Not enough space to display the name of blocks.
#bz8991# Update Dataverse dataset with citation when article published
#bz8992# Overwrite files on the Dataverse side when updated in OJS
#bz8997# Support new metadata fields added to Dataverse data deposit API
#bz8999# Block plugin updates settings table several times for each pageload
#bz9016# PKP PLN plugin can't reach staging server on upgraded OJS installations
#bz9018# COUNTER report counts other file types downloads as pdf
#bz9019# Improve marcxml generated by OAI
#bz9020# Plugin installer/updater moves plugin lib folders to the PKP WAL
#bz9022# Improve WebFeed plugin's license/rights metadata
#bz9033# Setting type 'boolean' is too long (and non-standard); use 'bool'
#bz9035# Remove hardcoded "&#187" bullets
#bz9042# copyright_holder element is localized
#bz9047# Can't access stats & report from journals in OJS Portals before the current year
#bz9054# Exported User's XML differs from the expected ones for importation
#bz9056# Fix CrossRef multilingual behavior
#bz9057# Default usage stats loader regex can't read apache log files in combined format
#i245#: Large log messages in the FileLoader can exceed PHP's memory_limit
#i249#: Acron plugin can't process scheduled tasks xml file without a frequency defined
#i253#: ReportPlugin::report() parameter implementation is inconsistent
#i255#: Article without Section causes fatal error
#i259#: Some article orderings may drop content from Table of Contents
#i262#: Timed views report double total galleys view counts and skip it in the last report row
#i263#: ALM plugin request stats takes to much time to answer
#i265#: Hide "Online Submissions" section of About when user registration disabled
#i267#: CrossRef export may refer to wrong journal path
#i271#: Allow Dataverse plugin to connect via API token
#i273#: Web feed plugin doesn't flag Atom subtitle content as HTML
#i275#: HTML syntax errors in HTML help
#i276#: SSL redirect ignores base_url[<journal_name>]
#i280#: Problem when deleting a CustomBlock
#i282#: Dataverse plugin: remove markup from dataset metadata
#i283#: Dataverse plugin: remove Dataverse file entry from database when suppfile deleted
#i284#: Dataverse plugin: check API response for deprecation warnings
#i285#: Galley Public Identifiers
#i286#: Dataverse plugin: publish Dataverses via API
#i288#: Make author index respect TOC author omit flags
#i289#: Make Google Viewer plugin protocol-relative
#i299#: UsageStats Loader doesn't recognize server aliases
#i301#: Plugin upgrade form broken after error
#i305#: Enhancement for uploading metadata to DOAJ
#i308#: Dataverse plugin: deaccessioning not supported in API v1.1
#i309#: Authors receive duplicated emails when editors use "Send email" functionality
#i311#: Review Upgrade script "minversion" attributes for recent entries
#i313#: Refback truncates to 80 characters at edit
#i317#: Certain locale files in Objects for Review plugin are labelled en_US
#i325#: Editor email parameters in OFR plugin are incorrect
#i335#: Missing geoLocationTool raises error
#i337#: Xml web service fails when it shouldn't
#i338#: Add send notification email hook
#i339#: Remote galleys are not used for statistics
#i340#: Articles from journals not intented for public display appear in search and browse author/title list
#i351#: Update copyright dates for 2015
#i352#: Make sure Acron plugin will not hit maximum execution time
#i355#: Labeling EPUB galleys according to their mime type
#i359#: Metrics region column doesn't store correctly all region values
#i360#: Problem with announcement type setting/checking
#i366#: Journal statistics from previous years not available if no object was published
#i371#: "Sponsors" incorrect in Portugese translation
#i392#: Extend session hash field in database
#i404#: Improvements to CrossRef deposit

OJS 2.4.7 Release Notes
GIT tag: ojs-2_4_7-0
Release date: October 9, 2015

Note: While we transition our issue management system from Bugzilla
(http://pkp.sfu.ca/bugzilla) to Github Issues
(http://www.github.com/pkp/pkp-lib/issues), this list will contain a mixture
of IDs from both systems. Bugzilla entries will be prefixed with “bz” and
Github issues will be prefixed with “i”.

Configuration Changes

New config.inc.php parameters:
- security:salt
- security:reset_seconds

New Features

i807: Add iParadigms functionality to CrossRef plugin
i380: Implement beacon
i427: Add bulk editing tools for email templates
i685: Data Privacy Option for Statistic Plugin
i741: Make Google Analytics available at the Site level
i768: Enable webservice support for PUT

Bug Fixes

i274: Counter report includes hard-coded English
i336: COMPONENT_ROUTER_PATHINFO_MARKER request raises error in Request::getRequestedPage()
i347: Prep OJS for automated releases
i384: Issue cover settings are too locale specific
i391: Add DOI to reference export formats
i393: Fatal error calling DataObject::getLocalizedData() by reference if only non-locale specific data exists.
i417: getPublishedArticleIdsByJournal() can return unpublished objects
i428: Untranslated locale key in comment for authors emailing comments
i429: Announcements don't respect date_posted ("published") setting
i437: Strict ValidatorInSet type checking breaks subscription type creation
i443: Exclude disabled users from mass mailouts
i447: Improve WCAG / Section 508 compliance
i448: Reader fees not included in About
i449: Javascripts blocked when OJS is served through HTTPS
i451: Translate ALM plugin to Brazilian portuguese
i452: ReferralDAO may query insert ID without insert
i460: Stats can't process Issues with unique identifiers
i464: Error on favicon upload, when determining the favicon type
i465: Empty copyright holder
i472: Consider other license URL on the article page
i482: Articles from journals not intented for public display appear in search results
i486: OJS native import/export DTD: copyright_holder is multilingual
i496: Broken links on Editorial Policies page
i497: Unexpected behavior using "+" operator to append items to arrays in subclasses
i499: Call superclass when overriding methods in Form and DAO subclasses
i509: Public galley ID validation
i511: Payment description HTML support inconsistent
i521: Author signature appended to notification email when an author uploads a revision
i522: Link to current issue does not redirect to public id
i523: PDF not shown due to jQuery conflict when ALM plugin is activated
i526: Backport ContextDAO::getBySetting() to JournalDAO
i529: ISSN Validator doesn't handle 0 or X checkdigits
i534: Default theme css is overwriting default OJS general styles
i535: View report fails if stats refer to an object that's not available anymore
i536: Already Paid option missing for manual payment if waiver text not set
i540: Make search queries use GET parameters
i546: Translate plugin creates new files with default translations
i551: Months with 4 or less letters in ABNT citations are handled incorrectly
i552: Getting stats for all articles slows down access if used in a high traffic site
i557: PostgreSQL sequence re-creation on upgrade
i559: additional article author metadata
i560: fix for the single step exclusion of URNs
i563: Updates/corrections needed to ALM Plugin
i571: Avoid sending duplicate emails to multiple recipients
i574: Notification subscription (mailing list) source is confusing
i577: Display galley pubIds on abstract and indexing metadata page
i578: Add missing int casts to IssueDAO
i588: Sorting Archives list by status as Section Editor leads to DB error
i589: Problem with pagination in DOAJ plugin
i590: Get localized journal description
i634: Update PubMED XML export to include affiliation info, keywords
i653: Native import causes fatal error during Issue cleanup after failure
i680: site.tpl nest at least two <p> in journal description
i682: Set cookie request method is using the wrong cookie path sometimes
i690: force_login_ssl setting should not allow HTTPS form on HTTP page
i691: Empty "Edit Profile Form" when Administrator that is not a Journal Manager edit an user
i692: Cancelled reviews are counted as completed ones in reviewer stats
i695: Improve password hashes and reset
i702: Switching form language while registering as a new user doesn't work
i705: Payments records are not moved to target user when merging
i712: Crossref plugin scheduled task is not using the correct task interface
i715: Tweak author disambiguation scheme
i720: Submission metadata omit authors setting is not working when notifying users and including TOC
i721: Tiny MCE corrupts DOAJ XML
i722: Prevent email sending interaction with acron plugin
i724: OAI requests for nonexistent journals result in site-wide OAI URL behavior
i729: assign an id to the objects for review nav item
i730: Automatic DOI registration to DataCite
i731: missing unregistered articles URL in crossref plugin settings
i732: consider the expire parameter for the cookies
i734: Usage stats loader task doesn't warn about not being able to move files
i737: "Patch" upgrading should not be a recommended path
i745: Passwords should not be emailed
i761: Position footer hooks consistently
i764: Duplicate missing keys in translator plugin
i766: Remove "from" display name use from forced envelope sender setting
i771: Webservice requests need a bit more error checking
i774: Clear div necessary in the object for review details view
i784: Support replacing missing translation with the english text
i794: XML Writer could support Comments
i798: DOIExportDom fails to return cached objects
i799: DataCite and CrossRef scheduled tasks error e-mails

Automated Build 2-4-7.1

This automated build adds the following fixes to the base release of OJS 2.4.7:

#550: [OJS] Disabled journals exposed in site-wide OAI
#817: [OJS] lib/password_compat includes .git file in release tarball
#818: Native export fails when missing copyright holders
#819: piwik plugin doesn't play well with others
#822: Wrong URL when exporting and registering DOIs via command line
#831: Validate password reset hash via new Validation method

Starting with OJS 2.4.6-1, this software will optionally provide PKP with a
unique identifier for the installation and the OAI base URL. These are to be
used for statistics and security alert purposes only.

This feature is optional. If you do not wish to participate, you may either
uncheck the “beacon” option in the installation form, or for existing installs,
edit your config.inc.php configuration file and set “enable_beacon” to Off.

Successfully upgraded to version 2.4.7.1
Code version: 2.4.7.1
Database version: 2.4.7.1
Latest version: 2.4.7.1
Your system is up-to-date

----------------------- end of result --------------`

Here is file compling.patch which adds slight features to ojs (part 1):

`-------------------- compling.patch -----------------

From 18278859a16cbe4583320b017b1ead86328db2b4 Mon Sep 17 00:00:00 2001
From: Sebastien L’haire sebastien@lhaire.org
Date: Sat, 3 Jan 2015 20:01:23 +0100
Subject: [PATCH] changes for computational linguistics for ojs table 2.4


classes/submission/reviewer/ReviewerAction.inc.php | 70 ++++±—
…/sectionEditor/SectionEditorAction.inc.php | 136 +++++++++++++++++
locale/en_US/locale.xml | 7 +
pages/editor/index.php | 7 +
pages/reviewer/SubmissionReviewHandler.inc.php | 50 +++++±
…/SubmissionCommentsHandler.inc.php | 29 ++±
…/sectionEditor/submission/editorDecision.tpl | 11 ++
…/comment/editorDiscussWithReviewersEmail.tpl | 163 +++++++++++++++++++++
…/submission/reviewForm/reviewFormResponse.tpl | 47 ++++±
9 files changed, 484 insertions(+), 36 deletions(-)
create mode 100755 templates/submission/comment/editorDiscussWithReviewersEmail.tpl

diff --git a/classes/submission/reviewer/ReviewerAction.inc.php b/classes/submission/reviewer/ReviewerAction.inc.php
index 9ee745c…23a7702 100644
— a/classes/submission/reviewer/ReviewerAction.inc.php
+++ b/classes/submission/reviewer/ReviewerAction.inc.php
@@ -11,6 +11,8 @@

  • @ingroup submission
  • @brief ReviewerAction class.
    • MODIFIED BY Sebastien L’haire (SL) for Computational Linguistics according previous work by cl staff
      */

import(‘classes.submission.common.Action’);
@@ -261,42 +263,47 @@ class ReviewerAction extends Action {

 /**
  * Post reviewer comments.
  • * @param $user object Current user
    
  • * @param $user object Current user 
    * @param $article object
    * @param $reviewId int
    * @param $emailComment boolean
    * @param $request Request
    
  •     * @param $validate boolean added by sl
    
  •     * 
    
  •     * MODIFIED BY Sebastien L'haire (SL) for Computational Linguistics according previous work by cl staff
    
  •     * 
    */
    
  • function postPeerReviewComment(&$user, &$article, $reviewId, $emailComment, $request) {
  • function postPeerReviewComment(&$user, &$article, $reviewId, $emailComment, $request, $validate) {
    if (!HookRegistry::call(‘ReviewerAction::postPeerReviewComment’, array(&$user, &$article, &$reviewId, &$emailComment))) {
    import(‘classes.submission.form.comment.PeerReviewCommentForm’);

        $commentForm = new PeerReviewCommentForm($article, $reviewId, ROLE_ID_REVIEWER);
        $commentForm->setUser($user);
        $commentForm->readInputData();
    
  •        if ($commentForm->validate()) {
    
  •            $commentForm->execute();
    
  •            // Send a notification to associated users
    
  •            import('classes.notification.NotificationManager');
    
  •            $notificationManager = new NotificationManager();
    
  •            $notificationUsers = $article->getAssociatedUserIds(false, false);
    
  •            foreach ($notificationUsers as $userRole) {
    
  •                $notificationManager->createNotification(
    
  •                    $request, $userRole['id'], NOTIFICATION_TYPE_REVIEWER_COMMENT,
    
  •                    $article->getJournalId(), ASSOC_TYPE_ARTICLE, $article->getId()
    
  •                );
    
  •            }
    
  •            if ($emailComment) {
    
  •                $commentForm->email($request);
    
  •            }
    
  •        } else {
    
  •            $commentForm->display();
    
  •            return false;
    
  •        }
    
  •                    if ($validate){ // SL: allow drafts of reviews to be stored by reviewers. Skip the validation step for drafts.
    
  •                        if ($commentForm->validate()) {
    
  •                                $commentForm->execute();
    
  •                                // Send a notification to associated users
    
  •                                import('classes.notification.NotificationManager');
    
  •                                $notificationManager = new NotificationManager();
    
  •                                $notificationUsers = $article->getAssociatedUserIds(false, false);
    
  •                                foreach ($notificationUsers as $userRole) {
    
  •                                        $notificationManager->createNotification(
    
  •                                                $request, $userRole['id'], NOTIFICATION_TYPE_REVIEWER_COMMENT,
    
  •                                                $article->getJournalId(), ASSOC_TYPE_ARTICLE, $article->getId()
    
  •                                        );
    
  •                                }
    
  •                                if ($emailComment) {
    
  •                                        $commentForm->email($request);
    
  •                                }
    
  •                        } else {
    
  •                                $commentForm->display();
    
  •                                return false;
    
  •                        }
    
  •                    }
           return true;
       }
    
    }
    @@ -321,16 +328,21 @@ class ReviewerAction extends Action {
    * @param $reviewId int
    * @param $reviewFormId int
    * @param $request Request
  •     * @param $validate boolean added by sl
    
  •     * * MODIFIED BY Sebastien L'haire (SL) for Computational Linguistics according previous work by cl staff
    */
    
  • function saveReviewFormResponse($reviewId, $reviewFormId, $request) {
  • function saveReviewFormResponse($reviewId, $reviewFormId, $request, $validate) {
    if (!HookRegistry::call(‘ReviewerAction::saveReviewFormResponse’, array($reviewId, $reviewFormId))) {
    import(‘classes.submission.form.ReviewFormResponseForm’);

        $reviewForm = new ReviewFormResponseForm($reviewId, $reviewFormId);
        $reviewForm->readInputData();
    
  •        if ($reviewForm->validate()) {
    
  •            $reviewForm->execute();
    
  •                    /* code modified by SL:  allow drafts of reviews to be stored by reviewers. Skip the validation step for drafts.*/
    
  •                    $reviewForm->execute();
    
  •        if ($validate && $reviewForm->validate()) {
    
  •                        /* end of modification */
               // Send a notification to associated users
               import('classes.notification.NotificationManager');
               $notificationManager = new NotificationManager();
    

diff --git a/classes/submission/sectionEditor/SectionEditorAction.inc.php b/classes/submission/sectionEditor/SectionEditorAction.inc.php
index b7f2c1b…2c84806 100644
— a/classes/submission/sectionEditor/SectionEditorAction.inc.php
+++ b/classes/submission/sectionEditor/SectionEditorAction.inc.php
@@ -2125,6 +2125,142 @@ class SectionEditorAction extends Action {
return false;
}
}
+

  •    /**
    
  • * Email Reviewers to discuss.
    
  • * @param $sectionEditorSubmission object
    
  • * @param $send boolean
    
  •     * COPIED AND ADAPTED FROM PREVIOUS VERSIONS BY Sebastien L'haire for CL
    
  •     * 
    
  • */
    
  • function emailReviewersDiscussion($sectionEditorSubmission, $send, $request) {

  •    $userDao =& DAORegistry::getDAO('UserDAO');
    
  •    $articleCommentDao =& DAORegistry::getDAO('ArticleCommentDAO');
    
  •    $sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
    
  •    $journal =& $request->getJournal();
    
  •    $user =& $request->getUser();
    
  •    $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
    
  •    $reviewAssignments =& $reviewAssignmentDao->getReviewAssignmentsByArticleId($sectionEditorSubmission->getId(), $sectionEditorSubmission->getCurrentRound());
    
  •    import('mail.ArticleMailTemplate');
    
  •    $email = new ArticleMailTemplate(
    
  •        $sectionEditorSubmission, 'EDITOR_DISCUSS_WITH_REVIEWERS');
    
  •    //NOT in use in rest of method
    
  •            //$copyeditor = $sectionEditorSubmission->getUserBySignoffType('SIGNOFF_COPYEDITING_INITIAL');
    
  •    if ($send && !$email->hasErrors()) {
    
  •        HookRegistry::call('SectionEditorAction::emailReviewersDiscussion', array(&$sectionEditorSubmission, &$send, &$request));
    
  •        $email->send($request);
    
  •        return true;
    
  •    } else {
    
  •        if (!$request->getUserVar('continued')) {
    
  •            $authorUser =& $userDao->getById($sectionEditorSubmission->getUserId());
    
  •            $authorEmail = $authorUser->getEmail();
    
  •            $email->assignParams(array(
    
  •                'editorialContactSignature' => $user->getContactSignature(),
    
  •                'authorName' => $authorUser->getFullName(),
    
  •                'journalTitle' => $journal->getLocalizedTitle()
    
  •            ));
    
  •            //adds Reviewers
    
  •            foreach ($reviewAssignments as $reviewAssignment) {
    
  •                if ($reviewAssignment->getDateCompleted() != null && !$reviewAssignment->getCancelled()) {
    
  •                    $reviewer =& $userDao->getById($reviewAssignment->getReviewerId());
    
  •                    if (isset($reviewer)) $email->addRecipient($reviewer->getEmail(), $reviewer->getFullName());
    
  •                }
    
  •            }
    
  •            $reviewIndexes =& $reviewAssignmentDao->getReviewIndexesForRound($sectionEditorSubmission->getId(), $sectionEditorSubmission->getCurrentRound());
    
  •            $body = '';
    
  •            foreach ($reviewAssignments as $reviewAssignment) {
    
  •                // If the reviewer has completed the assignment, then import the review.
    
  •                if ($reviewAssignment->getDateCompleted() != null && !$reviewAssignment->getCancelled()) {
    
  •                    // Get the comments associated with this review assignment
    
  •                    $articleComments =& $articleCommentDao->getArticleComments($sectionEditorSubmission->getId(), COMMENT_TYPE_PEER_REVIEW, $reviewAssignment->getId());
    
  •                    $reviewer =& $userDao->getUser($reviewAssignment->getReviewerId());
    
  •                    $reviewerName = "Reviewer:  " . $reviewer->getFullName();
    
  •                    if($articleComments) { 
    
  •                        $body .= "\n------------------------------------------------------\n";
    
  •                        //$body .= Locale::translate('submission.comments.importPeerReviews.reviewerLetter', array('reviewerLetter' => chr(ord('A') + $reviewIndexes[$reviewAssignment->getReviewId()]))) . "\n";
    
  •                        $body .= $reviewerName . "\n";
    
  •                        if (is_array($articleComments)) {
    
  •                            foreach ($articleComments as $comment) {
    
  •                                // If the comment is viewable by the author, then add the comment.
    
  •                                if ($comment->getViewable()) {
    
  •                                    $body .= SectionEditorAction::html2text($comment->getComments()) . "\n\n";
    
  •                                }
    
  •                            }
    
  •                        }
    
  •                        $body .= "------------------------------------------------------\n\n";
    
  •                    } 
    
  •                    if ($reviewFormId = $reviewAssignment->getReviewFormId()) {
    
  •                        $reviewId = $reviewAssignment->getId();
    
  •                        $reviewFormResponseDao =& DAORegistry::getDAO('ReviewFormResponseDAO');
    
  •                        $reviewFormElementDao =& DAORegistry::getDAO('ReviewFormElementDAO');
    
  •                        $reviewFormElements =& $reviewFormElementDao->getReviewFormElements($reviewFormId);
    
  •                        if(!$articleComments) {
    
  •                            $body .= "\n------------------------------------------------------\n";
    
  •                            //$body .= Locale::translate('submission.comments.importPeerReviews.reviewerLetter', array('reviewerLetter' => chr(ord('A') + $reviewIndexes[$reviewAssignment->getReviewId()]))) . "\n\n";
    
  •                            $body .= $reviewerName  . "\n";
    
  •                        }
    
  •                        foreach ($reviewFormElements as $reviewFormElement) {
    
  •                                                        if ($reviewFormElement->getIncluded()) {
    
  •                            $body .= String::html2text($reviewFormElement->getLocalizedQuestion()). "\n";
    
  •                            $reviewFormResponse = $reviewFormResponseDao->getReviewFormResponse($reviewId, $reviewFormElement->getId());
    
  •                            if ($reviewFormResponse) {
    
  •                                $possibleResponses = $reviewFormElement->getLocalizedPossibleResponses();
    
  •                                if (in_array($reviewFormElement->getElementType(), $reviewFormElement->getMultipleResponsesElementTypes())) {
    
  •                                    if ($reviewFormElement->getElementType() == REVIEW_FORM_ELEMENT_TYPE_CHECKBOXES) {
    
  •                                        foreach ($reviewFormResponse->getValue() as $value) {
    
  •                                            $body .= String::html2text($possibleResponses[$value-1]['content']) . "\n";
    
  •                                        }
    
  •                                    } else {
    
  •                                        $body .= String::html2text($possibleResponses[$reviewFormResponse->getValue()-1]['content']) . "\n";
    
  •                                    }
    
  •                                    $body .= "\n";
    
  •                                } else {
    
  •                                    $body .= $reviewFormResponse->getValue() . "\n\n";
    
  •                                }
    
  •                            }
    
  •                                                        }
    
  •                        }
    
  •                        $body .= "------------------------------------------------------\n\n";
    
  •                    }
    
  •                }
    
  •            }
    
  •            $oldBody = $email->getBody();
    
  •            if (!empty($oldBody)) $oldBody .= "\n";
    
  •            $email->setBody($oldBody . $body);
    
  •        }
    
  •        $email->displayEditForm($request->url(null, null, 'emailReviewersDiscussion', 'send'), array('articleId' => $sectionEditorSubmission->getId()), 'submission/comment/editorDiscussWithReviewersEmail.tpl', array('isAnEditor' => true));
    
  •        return false;
    
  •    }
    
  • }

  •    /**
    
  •     * END Copy
    
  •     */
    

    /**
    * Blind CC the editor decision email to reviewers.
    diff --git a/locale/en_US/locale.xml b/locale/en_US/locale.xml
    index 0d49c3a…daa07bb 100644
    — a/locale/en_US/locale.xml
    +++ b/locale/en_US/locale.xml
    @@ -175,6 +175,13 @@
    Change to
    Sent
    Editor Decision

  •    <!--
    
  •        CL: added by Sebastien L'haire
    
  •    -->
    
  •    <message key="submission.discussWithReviewers">Discuss w/ Reviewers</message>
    
  •    <!--
    
  •    END
    
  •    -->
    

    Round&nbsp;{$round}
    Editor Review
    Notify Author
    diff --git a/pages/editor/index.php b/pages/editor/index.php
    index dedda5b…408be19 100644
    — a/pages/editor/index.php
    +++ b/pages/editor/index.php
    @@ -154,6 +154,13 @@ switch ($op) {
    case ‘viewCopyeditComments’:
    case ‘postCopyeditComment’:
    case ‘emailEditorDecisionComment’:

  •        /**
    
  •         * Reintroduced by Sebastien L'haire for CL
    
  •         */
    
  •    case 'emailReviewersDiscussion' :
    
  •        /**
    
  •         * end
    
  •         */
    

    case ‘viewLayoutComments’:
    case ‘postLayoutComment’:
    case ‘viewProofreadComments’:
    diff --git a/pages/reviewer/SubmissionReviewHandler.inc.php b/pages/reviewer/SubmissionReviewHandler.inc.php
    index 571ec40…9d41f14 100644
    — a/pages/reviewer/SubmissionReviewHandler.inc.php
    +++ b/pages/reviewer/SubmissionReviewHandler.inc.php
    @@ -11,6 +11,8 @@

    • @ingroup pages_reviewer
    • @brief Handle requests for submission tracking.
    • MODIFIED BY Sebastien L’haire (SL) for Computational Linguistics according previous work by cl staff
      */

import(‘pages.reviewer.ReviewerHandler’);
@@ -27,6 +29,8 @@ class SubmissionReviewHandler extends ReviewerHandler {
* Display the submission review page.
* @param $args array
* @param $request PKPRequest

  •     * 
    
  •     *  MODIFIED BY Sebastien L'haire (SL) for Computational Linguistics according previous work by cl staff
    */
    

    function submission($args, $request) {
    $journal =& $request->getJournal();
    @@ -40,7 +44,39 @@ class SubmissionReviewHandler extends ReviewerHandler {
    $reviewAssignment = $reviewAssignmentDao->getById($reviewId);

       $reviewFormResponseDao =& DAORegistry::getDAO('ReviewFormResponseDAO');
    
  •            /*
    
  •            * CODE ADDED BY SL according previous work
    
  •            */
    
  •    $reviewFormElementDao =& DAORegistry::getDAO('ReviewFormElementDAO');
    
  •    //need to work out reviewFormId - we have reviewId, reviewAssignment
    
  •    $reviewFormId = $reviewAssignment->getReviewFormId();
    
  •    $requiredReviewFormElementIds = $reviewFormElementDao->getRequiredReviewFormElementIds($reviewFormId);
    
  •    //we have an array of requiredReviewFormElements, need an array of reviewFormResponseElements
    
  •    $reviewFormResponses =& $reviewFormResponseDao->getReviewReviewFormResponseValues($reviewId);
    
  •    foreach ($requiredReviewFormElementIds as $requiredReviewFormElementId) {
    
  •        if (!isset($reviewFormResponses[$requiredReviewFormElementId]) || $reviewFormResponses    [$requiredReviewFormElementId] == '') {
    
  •            $validResponseExists = 0;
    
  •            break;
    
  •        } 
    
  •        //$validResponseExists = 1;
    
  •    }
    
  •    if (!isset($validResponseExists)) {
    
  •        $validResponseExists = 1;
    
  •    }
    
  •    /*
    
  •            * END OF CODE ADDITION BY SL according previous work
    
  •            */
    
  •    if ($submission->getDateConfirmed() == null) {
           $confirmedStatus = 0;
       } else {
    

@@ -63,6 +99,9 @@ class SubmissionReviewHandler extends ReviewerHandler {
$templateMgr->assign_by_ref(‘journal’, $journal);
$templateMgr->assign_by_ref(‘reviewGuidelines’, $journal->getLocalizedSetting(‘reviewGuidelines’));

  •            /* Line added by SL according to previous work by CL staff*/
    
  •            $templateMgr->assign('validResponseExists', $validResponseExists);
    
  •    import('classes.submission.reviewAssignment.ReviewAssignment');
       $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
    

@@ -242,15 +281,24 @@ class SubmissionReviewHandler extends ReviewerHandler {
* Save review form response
* @param $args array
* @param $request PKPRequest

  •     * 
    
  •     * MODIFIED BY Sebastien L'haire (SL) for Computational Linguistics according previous work by cl staff
    */
    

    function saveReviewFormResponse($args, $request) {
    $reviewId = (int) array_shift($args);
    $reviewFormId = (int) array_shift($args);

  •            /*SL : code added*/
    
  •            $validate_arg = array_shift($args);
    
  •    $validate = is_null($validate_arg) ? TRUE : (bool) $validate_arg; //default to validation
    
  •            /* End of added code*/
    
  •    $this->validate($request, $reviewId);
       $this->setupTemplate(true);
    
  •    if (ReviewerAction::saveReviewFormResponse($reviewId, $reviewFormId, $request)) {
    
  •            /*SL parameter "$validate" added to code*/
    
  •    if (ReviewerAction::saveReviewFormResponse($reviewId, $reviewFormId, $request, $validate)) {
           $request->redirect(null, null, 'submission', $reviewId);
       }
    

    }
    diff --git a/pages/sectionEditor/SubmissionCommentsHandler.inc.php b/pages/sectionEditor/SubmissionCommentsHandler.inc.php
    index 0b1fab0…98ae390 100644
    — a/pages/sectionEditor/SubmissionCommentsHandler.inc.php
    +++ b/pages/sectionEditor/SubmissionCommentsHandler.inc.php
    @@ -211,6 +211,31 @@ class SubmissionCommentsHandler extends SectionEditorHandler {
    }
    }
    }

  •    /**
    
  •     * Email reviewers to discuss a paper.
    
  •     *  REINTRODUCED AND ADAPTED BY Sebastien L'haire (SL) for Computational Linguistics code still needed
    
  •     */
    
  •    function emailReviewersDiscussion($args, $request) {
    
  •            $articleId = (int) $request->getUserVar('articleId');
    
  •    $this->validate($articleId);
    
  •            $this->setupTemplate(true);
    
  •            if (SectionEditorAction::emailReviewersDiscussion($this->submission, $request->getUserVar('send'), $request)) {
    
  •                    if ($request->getUserVar('blindCcReviewers')) {
    
  •                            SubmissionCommentsHandler::blindCcReviewsToReviewers();
    
  •                    } else {
    
  •                            $request->redirect(null, null, 'submissionReview', array($articleId));
    
  •                    }
    
  •            }
    
  •    }
    
  • /**

    • END Modif
  • */

    /**

    • Blind CC the editor decision email to reviewers.
      @@ -226,7 +251,9 @@ class SubmissionCommentsHandler extends SectionEditorHandler {
      $request->redirect(null, null, ‘submissionReview’, array($articleId));
      }
      }

+/***

    • END Modification
  • /
    /
    *
    * Edit comment.
    * @param $args array
    diff --git a/templates/sectionEditor/submission/editorDecision.tpl b/templates/sectionEditor/submission/editorDecision.tpl
    index afaf7ff…c285d07 100644
    — a/templates/sectionEditor/submission/editorDecision.tpl
    +++ b/templates/sectionEditor/submission/editorDecision.tpl
    @@ -12,6 +12,17 @@

{translate key="submission.editorDecision"}

+ + + + + +
{translate key="submission.discussWithReviewers"} + {url|assign:"notifyAuthorUrl" op="emailReviewersDiscussion" articleId=$submission->getId()} {icon name="mail" url=$notifyAuthorUrl} + +
{translate key="editor.article.selectDecision"}

End of previous file

diff --git a/templates/submission/comment/editorDiscussWithReviewersEmail.tpl b/templates/submission/comment/editorDiscussWithReviewersEmail.tpl
new file mode 100755
index 0000000…8c73e62
— /dev/null
+++ b/templates/submission/comment/editorDiscussWithReviewersEmail.tpl
@@ -0,0 +1,163 @@
+{**

    • editorDiscussWithReviewersEmail.tpl
    • Copyright (c) 2003-2009 John Willinsky
    • Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
    • Editor Decision email template form
    • $Id: editorDecisionEmail.tpl,v 1.12 2009/05/26 01:31:18 mcrider Exp $
  • *}
    +{strip}
    +{assign var=“pageTitle” value=“email.compose”}
    +{assign var=“pageCrumbTitle” value=“email.email”}
    +{include file=“common/header.tpl”}
    +{/strip}

+
+


+<form method=“post” name=“emailForm” action="{$formActionUrl}"{if $attachmentsEnabled} enctype=“multipart/form-data”{/if}>
+
+{if $hiddenFormParams}
  • {foreach from=$hiddenFormParams item=hiddenFormParam key=key}
  •    <input type="hidden" name="{$key|escape}" value="{$hiddenFormParam|escape}" />
    
  • {/foreach}
    +{/if}
  • +{if $attachmentsEnabled}

    • {foreach from=$persistAttachments item=temporaryFile}
    •    <input type="hidden" name="persistAttachments[]" value="{$temporaryFile->getFileId()}" />
      
    • {/foreach}
      +{/if}

    +{include file=“common/formErrors.tpl”}
    +
    +{foreach from=$errorMessages item=message}

    • {if !$notFirstMessage}
    •    {assign var=notFirstMessage value=1}
      
    •    <h4>{translate key="form.errorsOccurred"}</h4>
      
    •    <ul class="plain">
      
    • {/if}
    • {if $message.type == MAIL_ERROR_INVALID_EMAIL}
    •    {translate|assign:"message" key="email.invalid" email=$message.address}
      
    •    <li>{$message|escape}</li>
      
    • {/if}
      +{/foreach}

    +{if $notFirstMessage}


  • +{/if}
    +
    +
    +{if $addressFieldsEnabled}
    +

  • +


    +

  • +


    +

  • +


    +

  • +


    +{/if}{* addressFieldsEnabled *}
    +
    +{if $attachmentsEnabled}
    +

    +


    +

  • +


    +{/if}
    +

    +


    +

  • +


    +

  • +


    +

  • +


    +
    +
    {fieldLabel name="to" key="email.to"}
  •    {foreach from=$to item=toAddress}
    
  •        <input type="text" name="to[]" id="to" value="{if $toAddress.name != ''}{$toAddress.name|escape} &lt;{$toAddress.email|escape}&gt;{else}{$toAddress.email|escape}{/if}" size="40" maxlength="120" class="textField" /><br/>
    
  •    {foreachelse}
    
  •        <input type="text" name="to[]" id="to" size="40" maxlength="120" class="textField" />
    
  •    {/foreach}
    
  •    {if $blankTo}
    
  •        <input type="text" name="to[]" id="to" size="40" maxlength="120" class="textField" />
    
  •    {/if}
    
  • {fieldLabel name="cc" key="email.cc"}
  •    {foreach from=$cc item=ccAddress}
    
  •        <input type="text" name="cc[]" id="cc" value="{if $ccAddress.name != ''}{$ccAddress.name|escape} &lt;{$ccAddress.email|escape}&gt;{else}{$ccAddress.email|escape}{/if}" size="40" maxlength="120" class="textField" /><br/>
    
  •    {foreachelse}I have installed file ojs-2.4.7-1.tar.gz
    
  • Then I have modified config.inc.php by adding

    •        <input type="text" name="cc[]" id="cc" size="40" maxlength="120" class="textField" />
      
    •    {/foreach}
      
    •    {if $blankCc}
      
    •        <input type="text" name="cc[]" id="cc" size="40" maxlength="120" class="textField" />
      
    •    {/if}
      
    {fieldLabel name="bcc" key="email.bcc"}
  •    {foreach from=$bcc item=bccAddress}
    
  •        <input type="text" name="bcc[]" id="bcc" value="{if $bccAddress.name != ''}{$bccAddress.name|escape} &lt;{$bccAddress.email|escape}&gt;{else}{$bccAddress.email|escape}{/if}" size="40" maxlength="120" class="textField" /><br/>
    
  •    {foreachelse}
    
  •        <input type="text" name="bcc[]" id="bcc" size="40" maxlength="120" class="textField" />
    
  •    {/foreach}
    
  •    {if $blankBcc}
    
  •        <input type="text" name="bcc[]" id="bcc" size="40" maxlength="120" class="textField" />
    
  •    {/if}
    
  •    <input type="submit" name="blankTo" class="button" value="{translate key="email.addToRecipient"}"/>
    
  •    <input type="submit" name="blankCc" class="button" value="{translate key="email.addCcRecipient"}"/>
    
  •    <input type="submit" name="blankBcc" class="button" value="{translate key="email.addBccRecipient"}"/>
    
  •    {if $senderEmail}
    
  •        <br/>
    
  •        <input type="checkbox" name="bccSender" id="bccSender" value="1"{if $bccSender} checked{/if} />&nbsp;&nbsp;<label for="bccSender">{translate key="email.bccSender" address=$senderEmail|escape}</label>
    
  •    {/if}
    
  •  
    {translate key="email.attachments"}
  •    {assign var=attachmentNum value=1}
    
  •    {foreach from=$persistAttachments item=temporaryFile}
    
  •        {$attachmentNum|escape}.&nbsp;{$temporaryFile->getOriginalFileName()|escape}&nbsp;
    
  •        ({$temporaryFile->getNiceFileSize()})&nbsp;
    
  •        <a href="javascript:deleteAttachment({$temporaryFile->getFileId()})" class="action">{translate key="common.delete"}</a>
    
  •        <br/>
    
  •        {assign var=attachmentNum value=$attachmentNum+1}
    
  •    {/foreach}
    
  •    {if $attachmentNum != 1}<br/>{/if}
    
  •    <input type="file" name="newAttachment" class="uploadField" /> <input name="addAttachment" type="submit" class="button" value="{translate key="common.upload"}" />
    
  •  
    {translate key="email.from"} {$from|escape}
    {fieldLabel name="subject" key="email.subject"}
    {fieldLabel name="body" key="email.body"} {$body|escape}

    +
    +

    <input name=“send” type=“submit” value="{translate key=“email.send”}" class=“button defaultButton” /> <input type=“button” value="{translate key=“common.cancel”}" class=“button” onclick=“history.go(-1)” />{if !$disableSkipButton} <input name=“send[skip]” type=“submit” value="{translate key=“email.skip”}" class=“button” />{/if}


    +
    +

    +{include file=“common/footer.tpl”}
    diff --git a/templates/submission/reviewForm/reviewFormResponse.tpl b/templates/submission/reviewForm/reviewFormResponse.tpl
    index 812e0ef…0ab6426 100644
    — a/templates/submission/reviewForm/reviewFormResponse.tpl
    +++ b/templates/submission/reviewForm/reviewFormResponse.tpl
    @@ -7,6 +7,7 @@
    *

    • Review Form to enter responses/comments/answers.
    • *MODIFIED BY Sebastien L’haire (SL) for Computational Linguistics according previous work by cl staff
      *}
      {strip}
      {if $editorPreview}
      @@ -20,23 +21,49 @@
      {/strip}

    {assign var=disabled value=0}
    +
    +{**
    +* code modified by SL
    +}
    +{assign var=validate value=1}
    +{assign var=dontValidate value=0}
    +{**
    +
    end of modification
    +*}
    {if $isLocked || $editorPreview}
    {assign var=disabled value=1}
    {/if}

    {$reviewForm->getLocalizedTitle()}

    {$reviewForm->getLocalizedDescription()}

    - -getId()}"> +{** +* code modified by SL +*} +getId():$validate}"> +{** +* end of modification +*} {foreach from=$reviewFormElements name=reviewFormElements key=elementId item=reviewFormElement} -

    {$reviewFormElement->getLocalizedQuestion()} {if $reviewFormElement->getRequired() == 1}*{/if}

    +{** +* code modified by SL +*} +

    {$reviewFormElement->getLocalizedQuestion()} {if $reviewFormElement->getRequired() == 1} (Required field){/if}

    +{** +* end of modification +*}

    {if $reviewFormElement->getElementType() == REVIEW_FORM_ELEMENT_TYPE_SMALL_TEXT_FIELD} {elseif $reviewFormElement->getElementType() == REVIEW_FORM_ELEMENT_TYPE_TEXT_FIELD} {elseif $reviewFormElement->getElementType() == REVIEW_FORM_ELEMENT_TYPE_TEXTAREA} - {$reviewFormResponses[$elementId]|escape} +{** +* code modified by SL +*} + {$reviewFormResponses[$elementId]|escape} +{** +* end of modification +*} {elseif $reviewFormElement->getElementType() == REVIEW_FORM_ELEMENT_TYPE_CHECKBOXES} {assign var=possibleResponses value=$reviewFormElement->getLocalizedPossibleResponses()} {foreach name=responses from=$possibleResponses key=responseId item=responseItem} @@ -64,7 +91,17 @@ {if $editorPreview}

    {else} -

    +{** +* code modified by SL +*} +

    + + getReviewFormId():$dontValidate}'" value="{translate key="reviewer.article.reviewFormResponse.form.saveAndResumeLater"}" class="button defaultButton" /> + +

    +{** +* end of modification +*} {/if}
     <p><span class="formRequired">{translate key="common.requiredField"}</span></p>
    


    1.9.1`

    Hi @sebastien,

    That patch is pretty much impossible to read as supplied; could you put it somewhere else online (e.g. Pastebin) and drop a link here?

    Regards,
    Alec Smecher
    Public Knowledge Project Team

    sorry:

    here is the results of upgrade.php check, upgrade and check again:

    here is compling.batch

    as you can see, no modification deals with users

    I’ve been eventually able to process with the “forget password” process successfuly, but if there is a way to restore login process, I would be glad.

    Hi @sebastien,

    In lib/pkp/xml/schema/common.xml, in the description for the users table, does your description of the password column match this?

    <field name="password" type="C2" size="255">
        <NOTNULL/>
    </field>
    

    Regards,
    Alec Smecher
    Public Knowledge Project Team

    yes it matches and it has been correctly applied

    mysql> describe users;
    +----------------------+--------------+------+-----+---------+----------------+
    | Field                | Type         | Null | Key | Default | Extra          |
    +----------------------+--------------+------+-----+---------+----------------+
    | user_id              | bigint(20)   | NO   | PRI | NULL    | auto_increment |
    | username             | varchar(32)  | NO   | UNI | NULL    |                |
    | password             | varchar(255) | NO   |     | NULL    |                |
    | salutation           | varchar(40)  | YES  |     | NULL    |                |
    | first_name           | varchar(40)  | NO   |     | NULL    |                |
    | middle_name          | varchar(40)  | YES  |     | NULL    |                |
    | last_name            | varchar(90)  | NO   |     | NULL    |                |
    | gender               | varchar(1)   | YES  |     | NULL    |                |
    | initials             | varchar(5)   | YES  |     | NULL    |                |
    | email                | varchar(90)  | NO   | UNI | NULL    |                |
    | url                  | varchar(255) | YES  |     | NULL    |                |
    | phone                | varchar(24)  | YES  |     | NULL    |                |
    | fax                  | varchar(24)  | YES  |     | NULL    |                |
    | mailing_address      | varchar(255) | YES  |     | NULL    |                |
    | country              | varchar(90)  | YES  |     | NULL    |                |
    | locales              | varchar(255) | YES  |     | NULL    |                |
    | date_last_email      | datetime     | YES  |     | NULL    |                |
    | date_registered      | datetime     | NO   |     | NULL    |                |
    | date_validated       | datetime     | YES  |     | NULL    |                |
    | date_last_login      | datetime     | NO   |     | NULL    |                |
    | must_change_password | tinyint(4)   | YES  |     | NULL    |                |
    | auth_id              | bigint(20)   | YES  |     | NULL    |                |
    | auth_str             | varchar(255) | YES  |     | NULL    |                |
    | disabled             | tinyint(4)   | NO   |     | 0       |                |
    | disabled_reason      | text         | YES  |     | NULL    |                |
    | suffix               | varchar(40)  | YES  |     | NULL    |                |
    | billing_address      | varchar(255) | YES  |     | NULL    |                |
    | inline_help          | tinyint(4)   | YES  |     | NULL    |                |
    +----------------------+--------------+------+-----+---------+----------------+
    

    I have asked editorial board members to test the connection process and maybe the “forgot password” process but no answer yet.

    best regards and happy holiday season

    Hi @sebastien,

    In your first post, the password column was described as varchar(40) not varchar(255); has something changed?

    Regards,
    Alec Smecher
    Public Knowledge Project Team

    Hi

    I had a look into backups and current database state:

    password column has changed from 40 to 255.

    However it seems that the hash string has not been updated.

    hash string seems the same for the first user in table. I have checked the password string for my username, which has been updated through the password recovery procedure and the hash string is longer.

    Password strings are the same size for all passwords except a few ones, which have probably been updated through password recovery.

    How could I reset all passwords?

    Thanx for you help

    Hi @sebastien,

    The hash should automatically be changed when the user next logs in. The upgrade itself shouldn’t change it. Is it possible that you changed hashing algorithms in config.inc.php accidentally?

    Regards,
    Alec Smecher
    Public Knowledge Project Team

    I have tried to set value of “encryption” parameter to both md5 and sha1 but it does not change.

    Actually, I cannot assert which algorithm was used with 2.4.5 installation because my archives are a mess, due to the theft of my laptop and mostly a bad organisation :-S

    Hi @sebastien,

    The easiest way to figure out what you were using before is to calculate some hashes in the database and compare them against known username/password combinations. You can do this by…

    SELECT username, SHA1(CONCAT(username,password)), password FROM users WHERE username='test_username_here';
    

    For MD5s, use MD5 instead of SHA1 in the above query.

    Regards,
    Alec Smecher
    Public Knowledge Project Team

    Hi @asmecher

    I have tried both methods for my password but no method gets my current password, nor another user’s one I know the password from.

    I have filled the salt in config file. I have tried to concat it in the string sent to md5 or sha1 function but no result. I have also tried to insert a column between user-password and salt string but no result. Can you give me a way to use the salt in my mysql query please?

    Happy new year and best regards

    Sébastien