OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Bug#8784 patch and Bug#8785 library patch error

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Bug#8784 patch and Bug#8785 library patch error

Postby victorp » Mon Jun 23, 2014 11:22 pm

I have received the error message from the following bugs patch for OJS 2.4.4-1:

(1) Bug#8784 (patch applied at OJS installation directory at "~/"):
Code: Select all
$ patch -p1 --dry-run < ~/Downloads/Bug8784.diff
patching file plugins/reports/timedView/TimedViewReportForm.inc.php
Hunk #2 FAILED at 82.
1 out of 2 hunks FAILED -- saving rejects to file plugins/reports/timedView/TimedViewReportForm.inc.php.rej
patching file plugins/reports/timedView/TimedViewReportPlugin.inc.php
patching file plugins/reports/timedView/locale/en_US/locale.xml
patching file plugins/reports/timedView/timedViewReportForm.tpl

(2) Bug#8785 (library patch applied relative to OJS installation directory at "~/lib/pkp/"):
Code: Select all
$ patch -p1 --dry-run < ~/Downloads/Bug8785b.diff
patching file classes/scheduledTask/ScheduledTask.inc.php
Hunk #1 FAILED at 120.
Hunk #2 FAILED at 128.
2 out of 2 hunks FAILED -- saving rejects to file classes/scheduledTask/ScheduledTask.inc.php.rej
patching file classes/scheduledTask/ScheduledTaskHelper.inc.php
Hunk #1 FAILED at 134.
1 out of 1 hunk FAILED -- saving rejects to file classes/scheduledTask/ScheduledTaskHelper.inc.php.rej
can't find file to patch at input line 74
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/tests/classes/scheduledTask/ScheduledTaskHelperTest.php b/tests/classes/scheduledTask/ScheduledTaskHelperTest.php
|index 82842e3..0335ec2 100644
|--- a/tests/classes/scheduledTask/ScheduledTaskHelperTest.php
|+++ b/tests/classes/scheduledTask/ScheduledTaskHelperTest.php
--------------------------
File to patch: ^C
victorp
 
Posts: 9
Joined: Sun Jan 26, 2014 8:06 am
Location: Singapore

Re: Bug#8784 patch and Bug#8785 library patch error

Postby bbeghelli » Tue Jun 24, 2014 2:36 pm

Hi victorp,

I can apply the patches with no problem here. The command I use is this one:
Code: Select all
patch -p1 -i /path/to/patch/file


If you want to first test the process without actually changing your files, you can add the dry run option. It will be like this:
Code: Select all
patch --dry-run -p1 -i /path/to/patch/file


Note that the library patch command should be run inside the lib/pkp folder.

Hope you can make it. Let me know if you did.

Regards,
Bruno
bbeghelli
 
Posts: 137
Joined: Tue Jun 25, 2013 2:22 pm

Re: Bug#8784 patch and Bug#8785 library patch error

Postby victorp » Wed Jun 25, 2014 1:27 am

I always perform a dry-run patch before committing.

I used the links at http://pkp.sfu.ca/wiki/index.php?title=OJS_2.4.4-1_Recommended_Patches to download the patches.

Patches for bugs #8764, #8785 (patch against OJS) and #8806 report no error during dry-run.

Also, I notice that patch for bug #8785 (patch against PKP library) has these lines:

Code: Select all
diff --git a/tests/classes/scheduledTask/ScheduledTaskHelperTest.php b/tests/classes/scheduledTask/ScheduledTaskHelperTest.php
index 82842e3..0335ec2 100644
--- a/tests/classes/scheduledTask/ScheduledTaskHelperTest.php
+++ b/tests/classes/scheduledTask/ScheduledTaskHelperTest.php

Code: Select all
diff --git a/tests/classes/scheduledTask/ScheduledTaskTest.php b/tests/classes/scheduledTask/ScheduledTaskTest.php
deleted file mode 100644
index d1d7886..0000000
--- a/tests/classes/scheduledTask/ScheduledTaskTest.php
+++ /dev/null

Are "a/tests/classes/..." and "b/tests/classes/..." correct? I thought they should be "a/classes/..." and "b/classes/..." instead.

Can you use the link above to download the recommended patches and try?
victorp
 
Posts: 9
Joined: Sun Jan 26, 2014 8:06 am
Location: Singapore

Re: Bug#8784 patch and Bug#8785 library patch error for 2.4.

Postby victorp » Wed Jun 25, 2014 11:00 pm

I have re-downloaded ojs-2.4.4-1.tar.gz and tried the existing 5 patches for OJS 2.4.4-1 - 3 out of 5 patches work and those didn't are the ones mentioned in this thread.

Have anyone else tried successfully with the patches from http://pkp.sfu.ca/wiki/index.php?title=OJS_2.4.4-1_Recommended_Patches against ojs-2.4.4-1.tar.gz downloaded from http://pkp.sfu.ca/ojs/download/ojs-2.4.4-1.tar.gz?
victorp
 
Posts: 9
Joined: Sun Jan 26, 2014 8:06 am
Location: Singapore

Re: Bug#8784 patch and Bug#8785 library patch error

Postby bbeghelli » Tue Jul 01, 2014 8:07 am

Hi victorp,

Sorry for the late and thanks for your private message, that made me come back into this.

You're right, the patch is not correct. I will fix it and update. I will let you know when it's done.

Thanks letting us know.

Regards,
Bruno
bbeghelli
 
Posts: 137
Joined: Tue Jun 25, 2013 2:22 pm

Re: Bug#8784 patch and Bug#8785 library patch error

Postby victorp » Thu Jul 17, 2014 2:16 am

Hello Bruno,

I am inquiring when will the corrected patches be available?

Thanks.
-Victor-
victorp
 
Posts: 9
Joined: Sun Jan 26, 2014 8:06 am
Location: Singapore

Re: Bug#8784 patch and Bug#8785 library patch error

Postby bbeghelli » Thu Jul 24, 2014 6:24 pm

Hi victorp,

The patches are fixed now. Please, also apply the 8785 ojs patch, there were some changes there.

Cheers,
Bruno
bbeghelli
 
Posts: 137
Joined: Tue Jun 25, 2013 2:22 pm

Re: Bug#8784 patch and Bug#8785 library patch error

Postby victorp » Thu Jul 24, 2014 11:23 pm

Thanks Bruno.

It works now. However, you may like to take a look at the filenames for the rest of the files in "~/plugins/generic/booksForReview/classes/"; the patched filename has plural "Books..." while the rest of the filenames are singular "Book…" -- maybe they should be renamed to plural "Books…" for consistency sake. :)
victorp
 
Posts: 9
Joined: Sun Jan 26, 2014 8:06 am
Location: Singapore


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests