Giter Club home page Giter Club logo

komments's Introduction

Hello! πŸ‘‹πŸ»

I am Maurice, I am developing ideas & tools for digital storytelling and an open web.

komments's People

Contributors

gearsdigital avatar hariom147 avatar jbidoret avatar malunopeleke avatar mauricerenck avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

komments's Issues

Cannot publish comments from the global comment page

Right after installing Komments 1.3.0 on a Kirby 3.6.0-rc.4 build I get the following error message in the developer console after trying to publish a test comment (no change on the panel page visible):

index.js:1 POST https://dev.domain.de/api/komments/publish 500
request @ index.js:1
post @ index.js:1
publish @ index.js?1636570749:349
click @ index.js?1636570749:349
Vt @ vendor.js:6
n @ vendor.js:6
Vt @ vendor.js:6
n @ vendor.js:6
i._wrapper @ vendor.js:6
index.js:1 {status: 'error', message: "Class 'mauricerenck\Komments\Exception' not found", code: 500, exception: 'Error', key: null, …}code: 500details: Array(0)length: 0[[Prototype]]: Array(0)exception: "Error"file: "../dev.domain.de/site/plugins/komments/utils/moderation.php"key: nullline: 143message: "Class 'mauricerenck\Komments\Exception' not found"route: "komments/publish"status: "error"[[Prototype]]: Objectconstructor: Ζ’ Object()hasOwnProperty: Ζ’ hasOwnProperty()isPrototypeOf: Ζ’ isPrototypeOf()propertyIsEnumerable: Ζ’ propertyIsEnumerable()toLocaleString: Ζ’ toLocaleString()toString: Ζ’ toString()valueOf: Ζ’ valueOf()defineGetter: Ζ’ defineGetter()defineSetter: Ζ’ defineSetter()lookupGetter: Ζ’ lookupGetter()lookupSetter: Ζ’ lookupSetter()proto: (...)get proto: Ζ’ proto()set proto: Ζ’ proto()
onError @ index.js:1
request @ index.js:1
await in request (async)
post @ index.js:1
publish @ index.js?1636570749:349
click @ index.js?1636570749:349
Vt @ vendor.js:6
n @ vendor.js:6
Vt @ vendor.js:6
n @ vendor.js:6
i._wrapper @ vendor.js:6
komments:1 Uncaught (in promise) {status: 'error', message: "Class 'mauricerenck\Komments\Exception' not found", code: 500, exception: 'Error', key: null, …}code: 500details: []exception: "Error"file: "../dev.domain.de/site/plugins/komments/utils/moderation.php"key: nullline: 143message: "Class 'mauricerenck\Komments\Exception' not found"route: "komments/publish"status: "error"[[Prototype]]: Object
Promise.then (async)
publish @ index.js?1636570749:349
click @ index.js?1636570749:349
Vt @ vendor.js:6
n @ vendor.js:6
Vt @ vendor.js:6
n @ vendor.js:6
i._wrapper @ vendor.js:6

The automated release is failing 🚨

🚨 The automated release from the main branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Backend comments are not showing

Spam email attack with some JavaScript and blind SQL injection method, afterwards, backend comments are not showing.

On the backend panel, the error is "Cannot read properties of undefined (reading 'dispatch')".

I deleted the comments from the content folder, and now it's working fine, but how can I deal with this using the plugin in the future?

Kirby: 3.10.0
Plugin: 1.11.1

Now I'm trying to change the version from 1.11.1 to 1.13.2, but in the backend panel, the comments list and details are not showing properly. (HTML and CSS need to adjust). Can you please guide me.

Cannot find commented page

I have installed and integrated your plugin to my Kirby 3.6.0 alpha test installation and when I try to post a comment I get an error message the the page cannot be found:
image

POST https://domain.tld/kirbytest/komments/send 404
sendKomment @ komments.js:78
(anonymous) @ komments.js:122

Could this be related to the 3.6 build?
Debugging turned on doesn't help.

Incompatible with Commentions plugin

After installing the latest Komments plugin via composer on a Kirby 3.6.0-rc.3 environment I just get an error 500 message for the panel and the website without any additional information in the browser console or the apache error log.
image
(in the screenshot Komments is not listed because if it is installed I couldn't open the panel anymore).

feat: queue new komments

Queue new comments and webmentions before storing them in markdown. Usefull for sites with a lot of reactions.

outbox.json file after saving

I found a crazy thing in the plugin.

If I change a simple text on any page in the panel and then click save, I see a file named outbox.json in the files section.
This only happens on listed (public) sites.

My website runs on PHP8. I have not installed any other plugins.
I have the same thing when i try to you use your plugin with the kirby starterkit
Do you possibly know what this is related to?

Labels not visible with 1.7.0

On my production site I have komments 1.6.0 installed which works and looks great:
image
With an upgrade to 1.7.0 on my development environment all the labels are gone (also in the source code):
image
I haven't changed the paths of the integration or the template code. What could be the issue?

Komments Pending label not translatable

When trying to change the label of the Komments Pending Widget nothing happens with Komments 1.3.0:

      komments:
        type: fields
        fields:
          kommentsPending:
            type: kommentsPending
            label: Wartende Kommentare

image

formFeedback not working

Using version 1.5.1 of this plugin together with Kirby 3.6.1 gives a JSON.parse error upon submitting a comment.
The comment gets submitted and I'm able to review it in the dashboard, but the form feedback element div.form-feedback doesn't work as no text appears and the class .moderation-note doesn't get added.

I could fix this problem.

In komments/utils/receiveKomment.php, line 165, I changed the following:

Before (not working)
public function sendReponseToClient(string $headlineTranslationString, string $messageTranslationString, number $httpCode, boolean $shouldReturnJson)

After (working)
public function sendReponseToClient(string $headlineTranslationString, string $messageTranslationString, number $httpCode, bool $shouldReturnJson)

Add support for strftime

I am using strftime instead of the default date schema and Komments doesn't show time/date in the templates.
Can you please add support for it (or an option in the config)?

Pending Messages being shown on pages as if they were already approved

I am using Kirby 4 with the Zero One theme.

I installed Komments with composer.

In config I have:
'mauricerenck.komments.komment-auto-publish' => false,
'mauricerenck.komments.auto-publish-verified' => false,
'mauricerenck.komments.webmention-auto-publish' => false,

I put the css snippet in header per instructions.

Then placed the other two snippets lower in the template for the comments.

In my article blueprint I added:
sections:
komments:
extends: sections/komments

When I open the article in the panel I can see that the messages are only pending and not approved, but when I view the main website the pending messages are still shown.

The main Komments tab from within the panel has not had any pending comments show up on it at all.

Pending comments panel reads wrong property 'authorurl': Undefined array key "authorurl"

I'm using komments and indieConnector with brid.gy to backfeed responses from my mastodon account into my posts.

When the webmention gets created on my post, it includes the author url in a field called authorUrl. The komments panel however, looks for a field called authorurl (with a lower u) which leads to an error in this code:

/var/www/kirby/site/plugins/komments/utils/base.php

  foreach ($collection as $item) {
            if ($item->kommentsInbox()->isNotEmpty()) {
                foreach ($item->kommentsInbox()->yaml() as $komment) {
                    $komment['spamlevel'] = (isset($komment['spamlevel'])) ? $komment['spamlevel'] : 0; // backward compatiblity
                    if (($komment['status'] === 'false' || $komment['status'] === false)) {
                        $pendingKomments[] = [
                            'id' => $komment['id'],
                            'slug' => $item->id(),
                            'author' => $komment['author'],
                            'authorUrl' => $komment['authorurl'],
                            'komment' => kirbytext(nl2br(html($komment['komment']))),
                            'kommentType' => (isset($komment['kommenttype'])) ? $komment['kommenttype'] : 'komment', // backward compatiblity
                            'image' => $komment['avatar'],
                            'title' => (string) $item->title(),
                            'url' => $item->panel()->url(),
                            'published' => date('Y-m-d H:i', strtotime($komment['published'])),
                            'verified' => ($komment['verified'] === true || $komment['verified'] === 'true') ? true : false,
                            'spamlevel' => $komment['spamlevel'],
                            'status' => ($komment['status'] === true || $komment['status'] === 'true') ? true : false,

Use in headless setup

Hi Maurice,

I'm running Kirby 3.6 as headless CMS with Nuxt.js and I was wondering if there is a way I can send comments from the frontend to Kirby using your Plugin?

Does the plugin offers an endpoint where I could send the formData? or is there any other way this could work?

Thank you for your great plugins!

Best,
Juan

Bridgy Fed webmention comments don't have author email address

Hi. I was trying to setup indieConnector + komments, and faced an issue (after working around mauricerenck/indieConnector#8):

The webmentions from mastodon/fediverse via fed.brid.gy do not have author email address, so I get the following error:

AH01071: Got error 'PHP message: Whoops\Exception\ErrorException: Undefined array key "email" in /var/www/html/site/plugins/komments/utils/receiveKomment.php:54
Stack trace:
#0 /var/www/html/site/plugins/komments/utils/receiveKomment.php(54): Whoops\Run->handleError()
#1 /var/www/html/site/plugins/komments/components/hooks.php(31): mauricerenck\Komments\KommentReceiver->createKomment()
#2 [internal function]: Kirby\Cms\App->mauricerenck\Komments\{closure}()
#3 /var/www/html/vendor/getkirby/cms/src/Toolkit/Controller.php(58): Closure->call()
#4 /var/www/html/vendor/getkirby/cms/src/Cms/Event.php(165): Kirby\Toolkit\Controller->call()
#5 /var/www/html/vendor/getkirby/cms/src/Cms/App.php(1700): Kirby\Cms\Event->call()
#6 /var/www/html/site/plugins/indieconnector/utils/hookHelper.php(18): Kirby\Cms\App->trigger()
#7 /var/www/html/site/plugins/indieconnector/index.php(63): mauricerenck\IndieConnector\HookHelper->triggerHook()
#8 [internal function]: Kirby\Http\Route->mauricerenck\IndieConnector\{closure}()
#9 /var/www/htm...'

If I add a check array_key_exists('email', $webmention['author']) and pass an empty string as authorEmail if the email does not exist, it works.

Should I raise a PR with this change? Are there other fields you recommend checking for existence before saving the comment?

Not compatible with kirby-matomo plugin

I have installed Komments together with the kirby-matomo plugin and the panel blueprint of the Matomo plugin doesn't work anymore after installing Komments.
The developer console shows the following error:

Uncaught ReferenceError: $bhZj$exports is not defined
at index.js?1629713017:formatted:277
at index.js?1629713017:formatted:2609

Line 277 looks like this:

var aa, Cb, ba, Ea = ga.MAX_SAFE_COMPONENT_LENGTH, Db = ($bhZj$exports = {}).re = aa = [], k = (Cb = []), x = (ba = {}), Eb = 0, z = function($, r, a) {

Cannot read properties of undefined (reading 'id')

Right after installing Komments 1.3.0 on a Kirby 3.6.0-rc.4 build I get the following error message in the Panel after switching to the Komments page:

Cannot read properties of undefined (reading 'id')

This is the output of the developer console:

TypeError: Cannot read properties of undefined (reading 'id')
at a.created (index.js:349)
at Vt (/media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6)
at nn (/media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6)
at a.Cn._init (/media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6)
at new a (/media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6)
at /media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6
at init (/media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6)
at /media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6
at f (/media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6)
at a.patch (/media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6)
t.config.errorHandler @ index.js:1

This is the mentioned line in the index.js (here the third one):

        created() {
            this.kommentList = this.queuedKomments,
            this.selectKomment(this.kommentList[0].id),
            this.loadKomments()
        },

The error is gone once there are comments shown on the page.

panel area not working with kirby 4

The komments plugin is working fine on the frontend. But the panel area is broken. If want to view it I get redirected to myurl.test/api/komments/queued and the following message appears:

{
"status": "error",
"message": "Unauthenticated",
"code": 401,
"exception": "Kirby\\Exception\\AuthException",
"key": "error.auth",
"file": "authentication.php",
"line": 14,
"details": [],
"route": "komments/queued"
}

Can't comment on translated content (with lang-specific slugs)

Some background first:

  • Kirby 3.9.6
  • Komments 1.11.0
  • PHP 8.2.8
  • localhost env, not-yet-deployed
  • 2 languages (default EN, additional CS)
  • Kirby newbie, first site in the making

I've set up the plugin based on your instructions here on GH. Got the panel, templates and all ready. Customized couple options in the config. Created one custom snippet for rendering the reply (really just updated layout).

Adding comments on the default language works without problems.

But when trying to comment on the translated version, I'm getting The page you wrote a comment for could not be found. error and no comment ever gets saved (checked via Panel and my content file).

  • both languages use the same article layout
  • I have different slug for articles in both langs - but even when I force the default EN slug, it won't work

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.