souramoo / commentoplusplus

Commento with out of the box patches and updates to add useful features and fixes. Also with one-click deploy to Heroku so you can get up and running fast.
MIT License
389 stars 62 forks source link

Comments disappearing after refresh - Google Sites #147

Open qforbeginners opened 1 year ago

qforbeginners commented 1 year ago

Hi,

I am using commento++ with Google Sites

I encountered an issue after first installing whereby comments would only show in the same session as they were made i.e. once you refreshed they were gone.

When checking in All Comments, I could see that all of the comments from the different pages were present but they all had the same path "[/embeds/16cb204cf3a9d4d223a0a3fd8b0eec5d/inner-frame-minified.html]"

So I used the data-page-id option to give each page a reference rather than this generic path.

However this has not worked and the issue persists. What can be done here? Thanks

qforbeginners commented 1 year ago

Seems like it's due to the fact that the Google Sites embed widget is a self-contained iframe and not in the same context as the rest of the page, so any attempt to retrieve the URL of the page returns some messed up URL for the widget.

This makes sense as the Permalink link in commento++ is the messed up link.

There are some discussions about this: https://support.google.com/sites/thread/45807210/bookmarks-in-html-that-is-embedded-in-google-site-do-not-work?hl=en https://stackoverflow.com/questions/74767914/adding-href-link-in-google-sites-through-embedded-code https://support.google.com/sites/thread/116960357/how-do-i-embed-code-not-in-an-iframe?hl=en

So maybe it's not possible but I was wondering if a potential enhancement might be that rather than the app trying to figure out the URL itself, I can provide it in the same way as the data-page-id option?

qforbeginners commented 1 year ago

For anyone who arrived here via google with the same problem...

I have switched to using GraphComment, which is free and can embed successfully (it does pick up that each page has the same 'URL' but they all get unique IDs and you can rename them after leaving a test comment to figure out which is which)

It is not self-hosted though

candidexmedia commented 9 hours ago

For anyone who arrived here via google with the same problem...

I have switched to using GraphComment, which is free and can embed successfully (it does pick up that each page has the same 'URL' but they all get unique IDs and you can rename them after leaving a test comment to figure out which is which)

It is not self-hosted though

Thanks for sharing your alternative solution!

I've been eyeing Waline as a potential FOSS, self-hosted alternative, since Commento++ may or may not be maintained at the moment.