Notification new issue Bug

Hi,

I have just installed 2.4.8.0 OJS version and I am not able to send notification about new issue.
It displays blank page with any script

Please, Could you help me ?

Andrea

A bit more detail would be needed to answer your question. Usually, a blank page has something to do with your server’s configuration. To narrow down that issue, please take a look at your server’s log and see if there are any error messages. If you post the error messages here, people will be able to help you better.

A look in the FAQ might help to get further information on how to solve your problem: When I click some button or follow some link, I'm left with a blank page. What do I do?

1 Like

We tried to do what is report in suggested link but we were able to resolve the problem.
In particular, the problem should be in file AuthorDAO.inc.php and we noticed that it´s add a 02 in this row: ‘’)ORDER BY aa.last_name, aa.first_name02"

Please, Could you suggest a solution ?

Your AuthorDAO should look like this:

If you have an unexplained change, I recommend replacing your source files with a fresh copy from the PKP OJS downloads page.

Thank you so much for your attention but the problem is unfold after unfolding version OJS 2.4.8.

Please, could you me another suggestion to solve this problem ?

What error message do your find in your webserver’s error log?

Usually, this indicates that a PHP error has occurred and the message has been sent to your web server or system log file. Check there – e.g. /var/log/apache/error.log, although the exact location will depend on your server configuration – for further details.

Input array does not match ?: SELECT DISTINCT
CAST(’’ AS CHAR) AS url,
0 AS author_id,
0 AS submission_id,
aa.email AS email,
0 AS primary_contact,
0 AS seq,
aa.first_name,
aa.middle_name,
aa.last_name,
CASE WHEN asl.setting_value = ‘’ THEN NULL ELSE
SUBSTRING(asl.setting_value FROM 1 FOR 255) END AS affiliation_l,
asl.locale,
CASE WHEN aspl.setting_value = ‘’ THEN NULL ELSE
SUBSTRING(aspl.setting_value FROM 1 FOR 255) END AS affiliation_pl,
/** CASE WHEN aa.country = ‘’ THEN NULL ELSE aa.country END */
aspl.locale AS primary_locale,
CASE WHEN aa.country = ‘’ THEN NULL ELSE aa.country END AS country
FROM authors aa
LEFT JOIN author_settings aspl ON (aa.author_id = aspl.author_id AND
aspl.setting_name = ‘affiliation’ AND aspl.locale = ‘it_IT’)
LEFT JOIN author_settings asl ON (aa.author_id = asl.author_id AND
asl.setting_name = ‘affiliation’ AND asl.locale = ‘it_IT’)
JOIN articles a ON (a.article_id = aa.submission_id AND a.status =
3)
JOIN published_articles pa ON (pa.article_id = a.article_id)
JOIN issues i ON (pa.issue_id = i.issue_id AND i.published = 1)
WHERE a.journal_id = ‘1’ AND
(aa.last_name IS NOT NULL AND aa.last_name <> ‘’)ORDER BY
aa.last_name, aa.first_name02

That statement looks like this one:

But it looks to be modified.

Did you refresh the source files from a clean download?

Yes, I and a technical person we tried to modify the file because notification function it doesn´t work but we don´t find a good solution. Please, How could we resolve this ?

The error message you’re reporting (“Input array does not match ?”) seems to indicate that the bound SQL parameters don’t match the number of values provided in $params.

If you revert the changes you’ve made, what error appears in the log?

Hello. A few word about me. I’m the technical person Andrea refers to. I’m NOT a php guy.

A) Error log by unmodified php

NOTICE: Undefined offset: 6 (/var/www/rivistapiccolaimpresa/lib/pkp/lib/adodb/adodb.inc.php:819), referer: http://rivistapiccolaimpresa.uniurb.it/index.php/index/user
[Wed Apr 06 15:25:30.510530 2016] [:error] [pid 19596] [client 193.205.3.57:33421] ojs2: DB Error: Unknown column ‘aa.first_name02’ in ‘order clause’, referer: http://rivistapiccolaimpresa.uniurb.it/index.php/index/user

B)

Modified AuthorDAO.inc.php

… snip …

            $paolo_query =
                    'SELECT DISTINCT
                            CAST(\'\' AS CHAR) AS url,
                            0 AS author_id,
                            0 AS submission_id,
                            ' . ($includeEmail?'aa.email AS email,':'CAST(\'\' AS CHAR) AS email,') . '
                            0 AS primary_contact,
                            0 AS seq,
                            aa.first_name,
                            aa.middle_name,
                            aa.last_name,
                            CASE WHEN asl.setting_value = \'\' THEN NULL ELSE SUBSTRING(asl.setting_value FROM 1 FOR 255) END AS affiliation_l,
                            asl.locale,
                            CASE WHEN aspl.setting_value = \'\' THEN NULL ELSE SUBSTRING(aspl.setting_value FROM 1 FOR 255) END AS affiliation_pl,
                            aspl.locale AS primary_locale,
                            CASE WHEN aa.country = \'\' THEN NULL ELSE aa.country END AS country
                            FROM    authors aa
                            LEFT JOIN author_settings aspl ON (aa.author_id = aspl.author_id AND aspl.setting_name = ? AND aspl.locale = ?)
                            LEFT JOIN author_settings asl ON (aa.author_id = asl.author_id AND asl.setting_name = ? AND asl.locale = ?)
                            JOIN articles a ON (a.article_id = aa.submission_id AND a.status = ' . STATUS_PUBLISHED . ')
                            JOIN published_articles pa ON (pa.article_id = a.article_id)
                            JOIN issues i ON (pa.issue_id = i.issue_id AND i.published = 1)
                    WHERE ' . (isset($journalId)?'a.journal_id = ? AND ':'') . '
                            (aa.last_name IS NOT NULL AND aa.last_name <> \'\')' .
                            $initialSql . 'ORDER BY aa.last_name, aa.first_name';

            $debug_export = var_export($paolo_query, true);
            error_log($debug_export . "\n", 3, "/tmp/paolo.log");
            error_log("-----------------------------------------------\n", 3, "/tmp/paolo.log");

            $debug_export = var_export($params, true);
            error_log($debug_export . "\n", 3, "/tmp/paolo.log");
            error_log("-----------------------------------------------\n", 3, "/tmp/paolo.log");

            $debug_export = var_export($rangeInfo, true);
            error_log($debug_export . "\n", 3, "/tmp/paolo.log");
            error_log("-----------------------------------------------\n", 3, "/tmp/paolo.log");


            $result =& $this->retrieveRange($paolo_query, $params, $rangeInfo);

… snip …

C)

/tmp/paolo.log as for above debug procedure

‘SELECT DISTINCT
CAST(’’ AS CHAR) AS url,
0 AS author_id,
0 AS submission_id,
aa.email AS email,
0 AS primary_contact,
0 AS seq,
aa.first_name,
aa.middle_name,
aa.last_name,
CASE WHEN asl.setting_value = ‘’ THEN NULL ELSE SUBSTRING(asl.setting_value FROM 1 FOR 255) END AS affiliation_l,
asl.locale,
CASE WHEN aspl.setting_value = ‘’ THEN NULL ELSE SUBSTRING(aspl.setting_value FROM 1 FOR 255) END AS affiliation_pl,
aspl.locale AS primary_locale,
CASE WHEN aa.country = ‘’ THEN NULL ELSE aa.country END AS country
FROM authors aa
LEFT JOIN author_settings aspl ON (aa.author_id = aspl.author_id AND aspl.setting_name = ? AND aspl.locale = ?)
LEFT JOIN author_settings asl ON (aa.author_id = asl.author_id AND asl.setting_name = ? AND asl.locale = ?)
JOIN articles a ON (a.article_id = aa.submission_id AND a.status = 3)
JOIN published_articles pa ON (pa.article_id = a.article_id)
JOIN issues i ON (pa.issue_id = i.issue_id AND i.published = 1)
WHERE a.journal_id = ? AND
(aa.last_name IS NOT NULL AND aa.last_name <> ‘’)ORDER BY aa.last_name, aa.first_name’

array (
0 => ‘affiliation’,
1 => ‘it_IT’,
2 => ‘affiliation’,
3 => ‘it_IT’,
4 => ‘1’,
5 => 0,
6 => 2,
)

NULL

Then … the query looks ok. I’m not sure but $params looks good. About $rangeInfo, that’s NULL and I guess the software can’t deal with that null value. Or maybe not, but the

NOTICE: Undefined offset: 6

in /var/log/apache2/error.log tell us something.

Ty for any hint. PaoloC

And maybe the problem is into retrieveRange function @ $params …

PaoloC

The error “DB Error: Unknown column ‘aa.first_name02’ in ‘order clause’” indicates that even your “unmodified” version is different from the stock download. Can you replace your files with the stock download and test?

Sorry, must be about my English language because I’m from Italy, but I tell you again , the problem arose before any change and whatever I switch from standard to modified source and vice-versa.

But of course you’re right, tomorrow I will reload the file, it’s ok

wget -c ojs/AuthorDAO.inc.php at ojs-stable-2_4_8 · pkp/ojs · GitHub

that version?

TyL. Paolo

Be sure to download the “raw” version if downloading a single file directly from Github.
wget -c https://raw.githubusercontent.com/pkp/ojs/ojs-stable-2_4_8/classes/article/AuthorDAO.inc.php

A fresh download should not have “aa.first_name02”.

Since we do not know where the “02” came from in your copy, I would still recommend downloading a fresh copy of all of the source files from http://pkp.sfu.ca/ojs/download/ojs-2.4.8.tar.gz . At the very least, you could compare your installation with the stock download to see if there are other discrepancies.

Hello.

Problem
sorted out.

Today downloaded
both

http://pkp.sfu.ca/ojs/download/ojs-2.4.8.tar.gz

and

https://raw.githubusercontent.com/pkp/ojs/ojs-stable-2_4_8/classes/article/AuthorDAO.inc.php

and diffed the AuthorDAO.inc.php files. The files are
the ==.

I then recovered from a backup the file installed by the
upgrade procedure we originally ran, as below

447 tar czvf
/root/ojs.tarz ojs

448 cd rivistapiccolaimpresa

449 ls

450 php tools/upgrade.php patch

451 php tools/upgrade.php upgrade

The file is different. Looks like the upgrade
procedure went wrong but we didn’t notice.

I installed the file from the raw repository.

Looks good. Ty everybody for support.

PaoloC

Good to hear!

If you haven’t intentionally made local changes to your source files, I strongly recommend using the “Full Package” upgrade method rather than the “Patch” upgrade method. It avoids unwelcome surprises like this.