onOffice-Web-Org / oo-wp-plugin

onOffice for WP-Websites
https://wp-plugin.onoffice.com
GNU General Public License v3.0
9 stars 9 forks source link

Form & estate preview issue on subdirectory WordPress installations #61

Closed manhattan-art closed 2 years ago

manhattan-art commented 3 years ago

Hello,

I've been working on onOffice WP Plugin integration and found out there's an issue that I thought you should be aware of. In case of subdirectory WordPress installation there are two types of requests sent with [oo_estate ...] shortcode that targeted to domain root instead of actual WordPress site url:

  1. POST onoffice-estate-preview Script file: /js/onoffice-form-preview.js in estate_refresh_preview (element, name) function (line 8).

  2. GET onoffice-estate-types.json Script file: /js/onoffice-estatetype.js in fetch_possible_types () function (line 5).

    These should be localized with WordPress site url, otherwise rewrite rules added with addStaticRewriteRules() function in /plugin/Controller/RewriteRuleBuilder.php on lines 57-58 won't be triggered, which results in js errors and constant spinner loading within form submit button.

Kind regards,

Artem

jayay commented 3 years ago

Hello Artem,

thank you for reporting this. Did you happen to implement a patch for this yourself?

jmaas-onoffice commented 2 years ago

I'm not sure if you're still reading this, but we will track this issue internally. Since you listed everything very nicely, I think this should be a quick fix, but it might still take a while, because we are busy working on a lot of existing changes. Hopefully, we can deal with this soon.

Thanks for reporting!