Hello,

When the Metatag module is enabled and trying to add product reference to a product I receive this error:

AJAX HTTP error occurred.
Code HTTP: 403
Debugging Information.
Path: /el/system/ajax
Status text: Forbidden
ResponseText:

AJAX HTTP error occured.
Code HTTP: 403
Debugging Information.
Path: /el/media/ajax/field_product_ref/und/form/field_product_gallery/und/form-SLydrfRL6ZAoo9YIda8AoBUukD42w5npiKILVL2e544
Status Text: Forbidden
ResponseText: [{"command":"settings","settings":{"basePath":"\/","pathPrefix":"el\/","ajaxPageState":{"theme":"md_orenmode","theme_token":"nnqCn9WsZA_EIeLvc-XZMHPizXVQPFN0rn2tUoDah-E"}},"merge":true},{"command":"insert","method":"replaceWith","selector":null,"data":"\u003Cdiv class=\u0022alert alert-danger\u0022 role=\u0022alert\u0022\u003E\u003Cbutton type=\u0022button\u0022 class=\u0022close\u0022 data-dismiss=\u0022alert\u0022\u003E\u003Cspan aria-hidden=\u0022true\u0022\u003E\u0026times;\u003C\/span\u003E\u003Cspan class=\u0022sr-only\u0022\u003EClose\u003C\/span\u003E\u003C\/button\u003E\u03a0\u03c1\u03bf\u03ad\u03ba\u03c5\u03c8\u03b5 \u03ad\u03bd\u03b1 \u03b1\u03bd\u03b5\u03c0\u03b1\u03bd\u03cc\u03c1\u03b8\u03c9\u03c4\u03bf \u03c3\u03c6\u03ac\u03bb\u03bc\u03b1.\u03a4\u03bf \u03b1\u03c0\u03b5\u03c3\u03c4\u03b1\u03bb\u03bc\u03ad\u03bd\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \u03c6\u03b1\u03af\u03bd\u03b5\u03c4\u03b1\u03b9 \u03cc\u03c4\u03b9 \u03c5\u03c0\u03b5\u03c1\u03b2\u03b1\u03af\u03bd\u03b5\u03b9 \u03c4\u03bf \u03bc\u03ad\u03b3\u03b9\u03c3\u03c4\u03bf \u03bc\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5 (2 MB) \u03c0\u03bf\u03c5 \u03c5\u03c0\u03bf\u03c3\u03c4\u03b7\u03c1\u03af\u03b6\u03b5\u03b9 \u03b1\u03c5\u03c4\u03cc\u03c2 \u03bf \u03b4\u03b9\u03b1\u03ba\u03bf\u03bc\u03b9\u03c3\u03c4\u03ae\u03c2.\u003C\/div\u003E\n","settings":null}]

I am using Metatag module 7.x-1.13, Media 7.x-2.0-alpha4, Commerce 7.x-1.11 and drupal core 7.43.
I had this issue previously and I increased memory limit on server and the problem solved. Few weeks ago, I updated drupal core in version 7.43 from version 7.42. At first I didn't had any problems, but suddenly this error occurred again...
When Metatag module is disabled, everything works fine!

Thank you in advance

Comments

kpatsali created an issue. See original summary.

damienmckenna’s picture

Priority: Critical » Normal

Have you enabled Metatag support for commerce products? Have you tried updating to the latest version?

kpatsali’s picture

Hello Damien,
thank you for the reply. Do you mean Metatag:OpenGraph Products? Because I don't see any other module for support commerce products. I have enabled Metatag of course and Metatag: OpenGraph. I made a few adjustments in content:product...
No, I didn't try to update Metatag... Should I?
Thank you

damienmckenna’s picture

Assigned: kpatsali » Unassigned

I meant whether you had enabled support for the Product entity on admin/config/search/metatags/settings.

Did you enable the "Output meta tags on admin pages" option?

And yes, you should definitely update the modules on your site if you're running into problems, the bugs might have been fixed already.

One thing I notice in the AJAX response is that the 'selector' value is 'null', which is weird, that should be a valid jQuery selector.

What you might try doing is seeing what happens if you load the path of the AJAX response on its own, the "/el/media/ajax/field_product_ref/und/form/field_product_gallery/und/form-SLydrfRL6ZAoo9YIda8AoBUukD42w5npiKILVL2e544" part of the response, or use your browser's web inspector to identify it. What you'll need to do is examine the HTML response, see if there's anything else in the response that isn't standard JSON.

kpatsali’s picture

Damien, thank you for the answer again...
I did all the above settings you suggested and also updated Metatag module... nothing changed... still the same error...

when loading path "/el/media/ajax/field_product_ref/und/form/field_product_gallery/und/form-SLydrfRL6ZAoo9YIda8AoBUukD42w5npiKILVL2e544" of the AJAX response I am getting this in my browser:

[{"command":"settings","settings":{"basePath":"\/","pathPrefix":"el\/","ajaxPageState":{"theme":"md_orenmode","theme_token":"nnqCn9WsZA_EIeLvc-XZMHPizXVQPFN0rn2tUoDah-E"}},"merge":true},{"command":"insert","method":"replaceWith","selector":null,"data":"\u003Cdiv class=\u0022alert alert-danger\u0022 role=\u0022alert\u0022\u003E\u003Cbutton type=\u0022button\u0022 class=\u0022close\u0022 data-dismiss=\u0022alert\u0022\u003E\u003Cspan aria-hidden=\u0022true\u0022\u003E\u0026times;\u003C\/span\u003E\u003Cspan class=\u0022sr-only\u0022\u003EClose\u003C\/span\u003E\u003C\/button\u003E\u03a0\u03c1\u03bf\u03ad\u03ba\u03c5\u03c8\u03b5 \u03ad\u03bd\u03b1 \u03b1\u03bd\u03b5\u03c0\u03b1\u03bd\u03cc\u03c1\u03b8\u03c9\u03c4\u03bf \u03c3\u03c6\u03ac\u03bb\u03bc\u03b1.\u03a4\u03bf \u03b1\u03c0\u03b5\u03c3\u03c4\u03b1\u03bb\u03bc\u03ad\u03bd\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \u03c6\u03b1\u03af\u03bd\u03b5\u03c4\u03b1\u03b9 \u03cc\u03c4\u03b9 \u03c5\u03c0\u03b5\u03c1\u03b2\u03b1\u03af\u03bd\u03b5\u03b9 \u03c4\u03bf \u03bc\u03ad\u03b3\u03b9\u03c3\u03c4\u03bf \u03bc\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5 (2 MB) \u03c0\u03bf\u03c5 \u03c5\u03c0\u03bf\u03c3\u03c4\u03b7\u03c1\u03af\u03b6\u03b5\u03b9 \u03b1\u03c5\u03c4\u03cc\u03c2 \u03bf \u03b4\u03b9\u03b1\u03ba\u03bf\u03bc\u03b9\u03c3\u03c4\u03ae\u03c2.\u003C\/div\u003E\n","settings":null}]

I don't know what to search for....
If it is a template error, I don't understand what should be fixed, because this isn't my template. I just bought it...
So far... the only solution I reached, is disable the module, then add a product and finally enable the module again...

damienmckenna’s picture

Version: 7.x-1.13 » 7.x-1.x-dev

What admin theme are you using? If you're not using one already, please change to the Seven theme and see if the problem persists.

kpatsali’s picture

Hello,
I 've managed to solve this problem today by disabling mod_Security filters on my server....
Thank you!

kpatsali’s picture

Status: Active » Fixed
damienmckenna’s picture

@kpatsali: Thanks for letting me know, glad you were able to solve the problem!

kpatsali’s picture

@DamienMcKenna: I thank you too!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.