OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Problem applying patch

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.

Problem applying patch

Postby SergioRuiz » Wed Feb 21, 2007 2:05 am

Hi!

I have a problem when I try to apply ojs-2.1.0-1_to_2.1.1.patch.

I enter

Code: Select all
patch -p1 --dry-run < ojs-2.1.0-1_to_2.1.1.patch


And I get the following error...

Code: Select all
The next patch would create the file cache/fc-help-toc-en_US-editorial.toc.000000.php,
which already exists!  Assume -R? [n] y
patching file cache/fc-help-toc-en_US-editorial.toc.000000.php
The next patch would create the file cache/fc-help-toc-en_US-editorial.toc.000001.php,
which already exists!  Assume -R? [n]


and so on... I keep saying 'Y' and then I get something like this...

Code: Select all
File to patch: y
y: No such file or directory
Skip this patch? [y] y
Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 6293
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urN ojs-2.1.0-1/cache/t_compile/%%10^106^10682937%%context.tpl.php ojs-2.1.1/cache/t_compile/%%10^106^10682937%%context.tpl.php
|--- ojs-2.1.0-1/cache/t_compile/%%10^106^10682937%%context.tpl.php     2006-02-03 13:26:40.000000000 -0800
|+++ ojs-2.1.1/cache/t_compile/%%10^106^10682937%%context.tpl.php       2006-07-17 16:34:34.000000000 -0700
--------------------------
File to patch:
y: No such file or directory


which I guess is related to the precedent error...

I also tried to empty data cache as site administrator, but I get the following error:

Code: Select all
Unknown cache type ""!


Any help would be appreciated. Best regards,

Sergio Ruiz
SergioRuiz
 
Posts: 31
Joined: Wed Aug 03, 2005 12:04 am
Location: Spain

Postby asmecher » Wed Feb 21, 2007 9:52 am

Hi Sergio,

You can ignore any patching problems for files in the cache directory; just delete all contents and make sure the directory is still writable by the web server. Check the release notes for the upgrade (docs/RELEASE) to make sure you've included any new configuration options that are required in config.inc.php.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8869
Joined: Wed Aug 10, 2005 12:56 pm

Postby SergioRuiz » Thu Feb 22, 2007 6:04 am

Thanks for your help once more, Alec.
I did something wrong :oops: ...
When I do
Code: Select all
php tools/upgrade.php patch

I get the following error:
Code: Select all
Code version:      2.1.0.1
Database version:  2.1.1.0
Latest version:    2.1.1.0
Database version is newer than code version!

I tried with...
Code: Select all
php tools/upgrade.php upgrade

And I get
Code: Select all
[load: upgrade.xml]
[version: 2.1.0.1]
[schema: ojs_schema.xml]
Successfully upgraded to version 2.1.0.1

And also with
Code: Select all
patch -p1 --dry-run < ojs-2.1.0-1_to_2.1.1.patch

But I keep getting the same result...
I tried restoring both files and database backups, but even just after restoring database backup it keeps complaining about different versions.
Any idea?

Thanks in advance,

Sergio Ruiz
SergioRuiz
 
Posts: 31
Joined: Wed Aug 03, 2005 12:04 am
Location: Spain

Postby asmecher » Thu Feb 22, 2007 10:06 am

Hi Sergio,

If the patch is giving you trouble and you know that your 2.1.0-1 installation is unmodified, you can simply install OJS 2.1.1 from scratch and bring across the relevant parts of the old installation:
  • The configuration file, config.inc.php (making sure that any new configuration options documented in the release notes are added)
  • The files path (as configured in config.inc.php)
  • The public directory
  • Also make sure that the cache directory and all contents are writable by the web server
As always, make sure everything is backed up before doing this.

After the files have all been updated as above, you should be able to use the upgrade tool to upgrade the database.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8869
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 4 guests