• Resolved ITCS

    (@dimath99)


    Hi,

    When trying to save the xml file options I am getting a 403 server error. I have checked the file permissions and the security settings of my server but everything seems fine.

    I believe that the problem is that your plugin is saving the xml file in public_html folder. Is there an option to save the file in wp-content/uploads folder?

    Thanks

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Algoritmika

    (@algoritmika)

    Hi @dimath99,

    Yes, you can save file in uploads folder by settings “XML file path and name” option in feed’s “General Options” to e.g.:

    
    wp-content/uploads/products.xml
    

    However, I’m not sure if it will help. As I understood, you are getting 403 error when you save settings, correct? XML file is not created at once when settings are saved, but only when it’s triggered by scheduled task (i.e. “Update period” option) or when you click “Create now” button manually. So if saving file to uploads folder won’t help – could you please let me know if a) you can successfully save plugin’s general settings (in “WooCommerce > Settings > Product XML Feeds > General”) and b) if standard WooCommerce settings are saving normally (e.g. “WooCommerce > Settings > General”).

    Thread Starter ITCS

    (@dimath99)

    Hi,

    Thanks for the quick response.

    You are correct, this does not solve the issue.

    Any advice?

    Thanks

    Thread Starter ITCS

    (@dimath99)

    I am able to save the General settings though.

    Plugin Author Algoritmika

    (@algoritmika)

    @dimath99,

    Do you mean you are able to save plugin’s “General” settings or WooCommerce “General” setting?

    Thread Starter ITCS

    (@dimath99)

    Plugin’s general settings.

    Plugin Author Algoritmika

    (@algoritmika)

    @dimath99,

    Ok, let me take a look at the plugin’s code, will get back to you shortly.

    Thread Starter ITCS

    (@dimath99)

    Thanks.

    I believe that it has to do with the URL that the plugin is using when trying to save the XML options wp-admin/admin.php?page=wc-settings&tab=alg_wc_product_xml_feeds&section=feed_1

    Maybe a security concern?

    Plugin Author Algoritmika

    (@algoritmika)

    @dimath99,

    Could you please try (for testing purposes) to set “XML header”, “XML item” and “XML footer” options to empty values and then save settings.

    By the way – do you have any security plugins (e.g. Wordfence) installed on your server?

    Thread Starter ITCS

    (@dimath99)

    Hi,

    Yes, it is working fine if the fields are empty.

    Indeed, Wordfence is installed.

    Plugin Author Algoritmika

    (@algoritmika)

    @dimath99,

    Ok, thanks for testing – I will be trying to fix it now. Meanwhile, could you please disable Wordfence just for a minute and try saving settings with “normal” “XML header/item/footer” options, so we could be sure that this is indeed is a Wordfence block.

    Thread Starter ITCS

    (@dimath99)

    I tried but the request was blocked again.

    Plugin Author Algoritmika

    (@algoritmika)

    Hi @dimath99,

    Sorry for the late reply. Hopefully I’ve managed to find a solution.

    Please update the plugin to v1.7.2. After that, please go to plugin’s “General” settings and disable newly added “Raw” input option checkbox (in “WooCommerce > Settings > Product XML Feeds > General > Advanced Options”).

    Now feed’s settings should be saving normally, however, it will now remove all HTML tags from “Template Options”. To solve this, you now need to replace all < and > with { and } in “Template Options”. For example, for the default settings, you would enter:

    XML header

    
    {?xml version = "1.0" encoding = "utf-8" ?}
    {root}
    {time}[alg_current_datetime]{/time}
    {title}{![CDATA[ Products Feed ]]}{/title}
    
    

    XML item

    
    {item}
    	{name}[alg_product_name cdata="yes"]{/name}
    	{short_description}[alg_product_short_description cdata="yes"]{/short_description}
    	{link}[alg_product_url]{/link}
    	{price}[alg_product_price]{/price}
    	{currency}[alg_shop_currency]{/currency}
    	{image_url}[alg_product_image_url image_size="full"]{/image_url}
    	[alg_product_gallery_image_url image_nr="1" before="{image_url_1}" after="{/image_url_1}"]
    	{sku}[alg_product_sku]{/sku}
    	{stock_quantity}[alg_product_stock_quantity]{/stock_quantity}
    	{categories}[alg_product_categories]{/categories}
    	{tags}[alg_product_tags]{/tags}
    	{total_sales}[alg_product_meta name="total_sales"]{/total_sales}
    {/item}
    
    

    XML footer

    
    {/root}
    

    Please let me know if it’s working correctly now.

    Thread Starter ITCS

    (@dimath99)

    Hi,

    I have updated the plugin to its latest version but this option is not present.

    Maybe because I have the pro version also installed?

    • This reply was modified 5 years, 3 months ago by ITCS.
    Plugin Author Algoritmika

    (@algoritmika)

    Hi @dimath99,

    Yes, it’s because of the Pro version. You need to update the Pro version to v1.7.2 as well (and actually you can disable/remove free version, as Pro overrides the free). You can update the Pro version manually via your account page or automatically by installing our WPFactory Helper plugin.

    Thread Starter ITCS

    (@dimath99)

    Hi,

    Thanks for this update, the issue has been solved!

    You have great support.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘403 error’ is closed to new replies.