2

I am trying to apply patch #110 from here in Drupal 7 - ViewsCalc.

I am following the instructions on this page: Applying patches on Mac OS X

When following the instructions, I get this error message:

Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/theme.inc b/theme.inc
|index 57d61ed..7db435b 100644
|--- a/theme.inc
|+++ b/theme.inc
--------------------------
File to patch: 

What should I do?

I've tried giving it the path to the theme.inc file. When I do this, it displays the following:

No such file or directory
Skip this patch? [y] 

As a work around, I have installed Drush Issue Queue Commands and I have applied the following command in Drush: drush iq-apply-patch 140665-#110

When I use this Drush command, I get the following error message:

Drush iq-apply-patch 140665-1: downloading patchfile                 [ok]
views_calc_grouping_140665-114.patch for project views_calc
Could not apply the patch with either -Np0 or -Np1; perhaps the patch[error]
was rolled for a different version of the project.

What am I doing wrong?

PS. I'm not sure if this is a valid question, as it deals with patching. However, it also deals with topics such as Drush so I believe it is on topic. If it is off topic, please could you direct me to the correct place to post it.

3
  • 1
    Did you try to patch the production version (7.x-1.1) or the development version (7.x-1.x-dev). The patch is built against the development version (you can see that in the right top issue summary). But since the patch is over a year old now, it might be that it no longer applies against the dev as well. – Neograph734 Apr 17 '16 at 18:19
  • @Neograph734 I've tried both dev and non dev versions. Is there a way to access the dev version from when the patch was made? – big_smile Apr 17 '16 at 18:24
  • 1
    Since this is git you could try to clone the repository (see the version control section under the title of the module project page) and revert some of the changes locally. So it is possible yes (though that IS off topic here). Also be careful as it can introduce security vulnerabilities. I'd recommend to start over again first. Remove all files, download the dev version and try one way to apply the patch. If it fails, start over again and try another way. (If a patch is applied partially all other attempts to patch it will fail.) – Neograph734 Apr 17 '16 at 18:29
2

Thanks for all the help. I worked this out!

When I was applying the patch, I placed the patch file in the root module directory. But it actually has to go inside in the directory of the actual module. Whoops!

E.g.

The patch goes inside of sites>all>modules>views_calc and not inside of sites>all>modules.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.