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

Detailview does not work because detail-site cannot be identified #111

Closed werph closed 2 years ago

werph commented 3 years ago

In combination with WPBackery onOffice\WPlugin\Controller\DetailViewPostSaveController::postContainsViewName() is not able to notice whether the saved site contains the shortcode for detailsites. so the plugin does not know which wp-site schould be opened by clicking any detail-button in listings.

I fixed this issue by setting the wanted pageId hardcoded in onOffice\WPlugin\Controller\DetailViewPostSaveController::onSavePost()

This works fine for me but it has to be done after every update. I could also imagine that this issue occurs in combination with other Editors such as Elementor as well.

werph commented 2 years ago

Were you able to reproduce the issue or do you need more information?

jayay commented 2 years ago

Hi! Thanks for the report! There's been trouble reproducing this. We'd be happy about more information.

Were you able to find out what exactly the problem is?

werph commented 2 years ago

Hi jayjay,

i made some debug outputs in onOffice\WPlugin\Controller\DetailViewPostSaveController::postContainsViewName() and saved the content of $post. I did this for a site-save which contains the shortcode '[oo_estate view="detail"]'. It seems that WPBakery encodes Raw-HTML as Base64. [oo_estate view="detail"] becomes JTVCb29fZXN0YXRlJTIwdmlldyUzRCUyMmRldGFpbCUyMiU1RCUyMA==

So the detail-site can never be identified.

I would recommend that the detail-site has to be selected manually instead of searching for short-codes every time a site is saved.

jayay commented 2 years ago

It seems that WPBakery encodes Raw-HTML as Base64

That sounds weird. Can this be disabled by setting? I'm sure this can break a whole bunch of other plugins, too.

werph commented 2 years ago

okay.... Yes. there is a possibility to register 3rd party shortcodes in WPBackery settings.

I'm sorry but I'm not that familiar with Wordpress and its concepts.