While I am trying to update security patches I got following error message.
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.
patching file app/code/core/Mage/Admin/Model/Observer.php
Hunk #1 FAILED at 37.
Hunk #2 FAILED at 44.
Hunk #3 FAILED at 55.
3 out of 3 hunks FAILED -- saving rejects to file app/code/core/Mage/Admin/Model/Observer.php.rej
patching file app/code/core/Mage/Core/Controller/Request/Http.php
Hunk #1 succeeded at 39 with fuzz 1 (offset 1 line).
Hunk #2 succeeded at 537 (offset 1 line).
patching file lib/Varien/Data/Collection/Db.php
Hunk #1 FAILED at 442.
1 out of 1 hunk FAILED -- saving rejects to file lib/Varien/Data/Collection/Db.php.rej
How can I update patches in this regard ??
Do you have any custom changes in those core files? The problem is either that or version missmatch with the patch file. A solution could be to manually apply the patch to the file by opening up the PATCH.xxxxx-xxxxx.sh file and look at the file paths and line numbers to compare and see where the added/changes lines should go (+ in front) and which lines should be deleted (- in front).
Related
Where is FPDF? I use Wordpress and Go Daddy, I am trying to use this WooCommerce PDF Watermark, and I am getting a fatal error that causes the watermark not to be visible.
The error is below, how can I fix this?
Notice: iconv(): Wrong charset, conversion from UTF-8' to ISO-8859-1//TRANSLIT' is not allowed in /var/www/wp-content/plugins/woocommerce-pdf-watermark/includes/class-wc-pdf-watermarker.php on line 128
Fatal error: Uncaught Exception: FPDF error: Some data has already been output, can't send PDF file in /var/www/wp-content/plugins/woocommerce-pdf-watermark/includes/lib/fpdf/fpdf.php:292 Stack trace: #0 /var/www/wp-content/plugins/woocommerce-pdf-watermark/includes/lib/fpdf/fpdf.php(1081): FPDF->Error('Some data has a...') #1 /var/www/wp-content/plugins/woocommerce-pdf-watermark/includes/lib/fpdf/fpdf.php(1020): FPDF->_checkoutput() #2 /var/www/wp-content/plugins/woocommerce-pdf-watermark/includes/class-wc-pdf-watermarker.php(521): FPDF->Output() #3 /var/www/wp-content/plugins/woocommerce-pdf-watermark/includes/class-wc-pdf-watermark.php(610): WC_PDF_Watermarker->watermark(NULL, NULL, '/var/www/wp-con...', NULL, true) #4 /var/www/wp-includes/class-wp-hook.php(303): WC_PDF_Watermark->maybe_render_preview('') #5 /var/www/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array) #6 /var/www/wp-includes/plugin.php(470): WP_Hook->do_action(Array) #7 /var/www/wp-admin/admin.php(175): do_action('admin_init') #8 {m in /var/www/wp-content/plugins/woocommerce-pdf-watermark/includes/lib/fpdf/fpdf.php on line 292
The server hosting your WordPress site must have the PHP class FPDF installed.
It is generating PDF files free of charge.
That class is one of the requirements of the Plugin "WooCommerce PDF Watermark".
See if you can install it at Go Daddy.
For instance by making FPDF a Composer requirement, if you can use Composer with your hosting package.
I am getting the following exception while building the recovery for a lineageos project and need some help diagnosing and resolving the issue:
ERROR (phandle_references): Reference to non-existent node or label "smb_int_default"
ERROR (phandle_references): Reference to non-existent node or label "gpio_led_off"
ERROR: Input tree has errors, aborting (use -f to force output)
scripts/Makefile.lib:292: recipe for target 'arch/arm64/boot/dts/qcom/msm8917-pmi8937-qrd-sku5.dtb' failed
make[3]: *** [arch/arm64/boot/dts/qcom/msm8917-pmi8937-qrd-sku5.dtb] Error 2
make[3]: *** Waiting for unfinished jobs....
CC drivers/media/platform/msm/camera_v2/isp/msm_isp40.o
CC drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_hw.o
CC drivers/media/radio/radio-iris.o
LD drivers/media/platform/msm/camera_v2/msm_vb2/built-in.o
CC drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_platform.o
CC drivers/media/radio/radio-iris-transport.o
LD drivers/media/platform/msm/camera_v2/jpeg_10/built-in.o
CC drivers/media/platform/msm/camera_v2/isp/msm_isp.o
/home/lineageos/kernel/lenovo/msm8917/scripts/Makefile.build:402: recipe for target 'arch/arm64/boot/dts/qcom' failed
make[2]: *** [arch/arm64/boot/dts/qcom] Error 2
/home/lineageos/kernel/lenovo/msm8917/arch/arm64/Makefile:92: recipe for target 'dtbs' failed
make[1]: *** [dtbs] Error 2
make[1]: *** Waiting for unfinished jobs....
Device tree:= https://github.com/darran-kelinske-fivestars/android_device_lenovo_tb8504f/tree/lineage-15.1
Vendor tree:= https://github.com/darran-kelinske-fivestars/android_vendor_lenovo_tb8504f/tree/lineage-15.1
Kernel source:= https://github.com/darran-kelinske-fivestars/android_kernel_lenovo_tb8504f/tree/lineage-15.1
ROM Source:= https://github.com/LineageOS/android
Command: source build/envsetup.sh && breakfast tb8504f && repo sync --force-sync -q -j6 && mka recoveryimage -j6 | tee recovery.log
Full log:
https://pastebin.com/9V7tQu9G
I really appreciate the help from danlor.
I took at different approach to solving this problem.
I was using a kernel defconfig that was recommended by another rom builder and I'm not sure if it was correct so I found a way to get the defconfig from the kernel of the device.
I pulled the boot.img file off the device
I then grabbed the config from the kernel
/usr/src/linux-headers-4.18.0-25-generic/scripts/extract-ikconfig kernel > lineageos_tb8504f_defconfig
I then uploaded it to the kernel repo:
https://github.com/darran-kelinske-fivestars/android_kernel_lenovo_tb8504f/commit/72370bfa987297398662e314a6c6e898dd193ddb
From there, I set to user it in the make files of the device repo.
https://github.com/darran-kelinske-fivestars/android_device_lenovo_tb8504f/commit/460d9657ab0572e448be39422b98fc0b23b0c257
To get the device tree, I used the following tool:
https://github.com/PabloCastellano/extract-dtb
I extracted the device tree
./extract-dtb.py ../../../boot.img
I then found the dbt file for the tree that was referenced above and dumped it to a file
fdtdump 26_dtbdump_Qualcomm_Technologies,_Inc._MSM8917-PMI8937_QRD_SKU5.dtb > sku5.txt
I then updated the device tree file to what was in the dump:
https://github.com/darran-kelinske-fivestars/android_kernel_lenovo_tb8504f/commit/6ae1722b1906a06bb5d0b6cf8e0d8c7501ff9555
I was then able to successfully build the recovery.
[ 99% 1462/1467] Prebuilt: (/home/lineageos/out/target/product/tb8504f/kernel)
[ 99% 1463/1467] Target boot image: /home/lineageos/out/target/product/tb8504f/boot.img
/home/lineageos/out/target/product/tb8504f/boot.img maxsize=68395008 blocksize=135168 total=27078656 reserve=811008
[ 99% 1464/1467] Copying baseline ramdisk...
Modifying ramdisk contents...
cp: cannot stat '/home/lineageos/out/target/product/tb8504f/root/init.recovery.*.rc': No such file or directory
----- Making uncompressed recovery ramdisk ------
[ 99% 1465/1467] ----- Making compressed recovery ramdisk ------
[ 99% 1466/1467] ----- Making recovery image ------
+/home/lineageos/out/target/product/tb8504f/recovery.img maxsize=68395008 blocksize=135168 total=33243136 reserve=811008
----- Made recovery image: /home/lineageos/out/target/product/tb8504f/recovery.img --------
[100% 1467/1467] build /home/lineageos/out/target/product/tb8504f/system/etc/recovery-resource.dat
#### build completed successfully (04:41 (mm:ss)) ####
I've got a couple of problems with git am. I had a patch made from git format-patch and it usually worked nicely.
Now I just merged a couple of things and git am failed with:
Applying: Improve speed of computes
error: patch failed: product_cost_incl_bom/models/product_product.py:38
error: product_cost_incl_bom/models/product_product.py: patch does not apply
Then how do I know why the patch doesn't apply...Now the weird thing is this:
I then did this:
$: patch -p1 .git/rebase-apply/patch
patching file product_cost_incl_bom/__openerp__.py
patching file product_cost_incl_bom/models/mrp_bom.py
patching file product_cost_incl_bom/models/product_product.py
Hunk #2 succeeded at 39 with fuzz 1
So why does git am fails but patch doesn't. And what's the fuzz 1?
I got this error when I tried to install the path PATCH_SUPEE-1533.
I have magento 1.9.1.0
sh PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh
PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh: 24: 127: not found
PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh: 24: 127: not found
PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh: 29: 0: not found
Checking if patch can be applied/reverted successfully...
-e ERROR: Patch can't be applied/reverted successfully.
patching file app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php.rej
patching file app/code/core/Mage/Adminhtml/controllers/DashboardController.php
thanks
The security patch SUPEE-1533 is already there in magento 1.9.1.0.
Check the two files the patch applies to:
app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php
app/code/core/Mage/Adminhtml/controllers/DashboardController.php
Search for serialize in both of those. If you find serialize or unserialize, you need to manually apply the fix.
Refer to lines 171, 172 in the patch file for Graph.php and 184,185,186 for DashboardController.php
I want to download the code of nopcommorce with this changes
http://nopcommerce.codeplex.com/SourceControl/changeset/f438f188fa4e
For get this I am going to clone the code and it's not make clone. I got error that
% hg clone --verbose -- https://hg.codeplex.com/nopcommerce .
requesting all changes
adding changesets
adding manifests
adding file changes
transaction abort!
rollback completed
abort: stream ended unexpectedly (got 1718536 bytes, expected 3694604)
[command returned code 255 Sat Oct 27 14:51:03 2012]
% hg clone --verbose -- https://hg.codeplex.com/nopcommerce .
requesting all changes
adding changesets
adding manifests
adding file changes
transaction abort!
rollback completed
abort: stream ended unexpectedly (got 997670 bytes, expected 5238782)
[command returned code 255 Sat Oct 27 14:53:37 2012]
Can someone tell me how I can got it worked. I have both tortoseHG and tortoiseSVN both installed..
how I can got the code on my computer with the recent changes.
It's mercurial repo, you have to use only hg
It's big repo, for such cases clone to some non-tip revision and set of pulls may work better (-r option for clone|pull)
% hg clone --verbose -- https://hg.codeplex.com/nopcommerce .
requesting all changes
adding changesets
adding manifests
adding file changes
added 3021 changesets with 54579 changes to 15033 files (+6 heads)
...
4280 files updated, 0 files merged, 0 files removed, 0 files unresolved
[command completed successfully Sat Oct 27 15:48:37 2012]