Popfetcher Plugin does not show replies as comments

Discussion corner for Developers of Serendipity.
Post Reply
User avatar
aschlemmer
Regular
Posts: 70
Joined: Fri Feb 23, 2007 7:13 pm
Location: Freiburg/Germany
Contact:

Popfetcher Plugin does not show replies as comments

Post by aschlemmer » Wed Sep 04, 2019 9:34 pm

Hi all!
After updating s9y to 2.3.1, Popfetchet is not working like the 2.0.1 version which has showed replies as comments – that is our core idea of the blog :-(

Code: Select all

Detected comment/reply instead of blog entry. (schnellze.it lebt, #2594)bool(false) 
Could not save comment.
What has changed and why? Please help me ...

Additional question: Also as a part of our blog, we need to restrict the senders to more than one - we are two :-) - is there a way to reestablish this? Separating with comma or semicolon was not successful.

Thanks for every help ... I'm sure that at least Garvin remembers our project which we started around 2009 or so.
Kind regards and: long live s9y!
Achim
www.ms-reporter.de
Pharma-unabhängige Infos für Multiple Sklerose-Betroffene
schnellze.it
Einzigartiges Zusammenspiel aus Popfetcher und s9y

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Popfetcher Plugin does not show replies as comments

Post by garvinhicking » Thu Sep 05, 2019 12:13 pm

Hm, maybe something in the DB structure changed. Reading the code the only way the workComment() method can return false is if:

A.) The entry itself does not allow comments or the database retruns errors, please try to run thie SQL query on your database if possible:

Code: Select all

SELECT id, allow_comments, moderate_comments, last_modified, timestamp, title FROM serendipity_entries WHERE id = 2594
B.) The entry query itself does not resolve properly, maybe because of a 'showFutureEntries' configuration problem, or a misconfigured server time (is that enabled or disabled in your blog?) Also, missing associated authors could be a problem. Please run this query:

Code: Select all

SELECT a.email, e.title, a.mail_comments, a.mail_trackbacks
                     FROM serendipity_entries e, serendipity_authors a
                     WHERE e.id  = 2594
                       AND e.isdraft = 'false'
                       AND e.authorid = a.authorid
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
aschlemmer
Regular
Posts: 70
Joined: Fri Feb 23, 2007 7:13 pm
Location: Freiburg/Germany
Contact:

Re: Popfetcher Plugin does not show replies as comments

Post by aschlemmer » Thu Sep 05, 2019 8:51 pm

Thanks, Garvin!
Future entries have been disabled although I enabled them now and the comment still doesn't show up.

A) result of first query:

Code: Select all

id	allow_comments	moderate_comments	last_modified	timestamp	title
2594	 	true	1567624727	1567624727	schnellze.it lebt
B) second query:

Code: Select all

email	title	mail_comments	mail_trackbacks
abc@aschlemmer.net	schnellze.it lebt	1	1
What else could I do to resolve my issue and bring the blog to its former behaviour to show replies as comments?

Additionally, how to configure it to allow two senders to blog by Popfetcher? Like I said before, comma and semicolon are not working to separate 2 email addresses.

Thanks in advance,
Achim
www.ms-reporter.de
Pharma-unabhängige Infos für Multiple Sklerose-Betroffene
schnellze.it
Einzigartiges Zusammenspiel aus Popfetcher und s9y

User avatar
aschlemmer
Regular
Posts: 70
Joined: Fri Feb 23, 2007 7:13 pm
Location: Freiburg/Germany
Contact:

Re: Popfetcher Plugin does not show replies as comments

Post by aschlemmer » Thu Sep 05, 2019 9:06 pm

Aha! The entry wanted to be all comments to be moderated! Now it shows up. Even this option was set to 'no' in the popfetcher configuration screen. How to turn this off permanently? There is and will never be a way to comment by a form. Only two senders can comment by email there, that's what I need ...

Popfetcher though now throws out some fancy fatal errors and leaves the backend:

Code: Select all

Fatal error: Uncaught Error: Call to undefined function serendipity_purgeEntry() in serverpath/plugins/serendipity_event_popfetcher/serendipity_event_popfetcher.php:408 Stack trace: #0 serverpath/plugins/serendipity_event_popfetcher/serendipity_event_popfetcher.php(583): serendipity_event_popfetcher->workComment('2594', Array, 'NORMAL') #1 serverpath/plugins/serendipity_event_popfetcher/serendipity_event_popfetcher.php(1545): serendipity_event_popfetcher->workEntry('Re: schnellze.i...', 'Tun die Antwort...', '3', Array, NULL, Object(stdClass)) #2 serverpath/plugins/serendipity_event_popfetcher/serendipity_event_popfetcher.php(1579): serendipity_event_popfetcher->workPopfetcher(Array) #3 serverpath/include/plugin_api.inc.php(1138): serendipity_event_popfetcher->event_hook('backend_sidebar...', Object(serendipity_property_bag), Array, NULL) #4 serverpath/serendipity_admin.php(198): serendipity_plugin_api::hook_event('backend_sidebar...', Arr in serverpath/plugins/serendipity_event_popfetcher/serendipity_event_popfetcher.php on line 408	
www.ms-reporter.de
Pharma-unabhängige Infos für Multiple Sklerose-Betroffene
schnellze.it
Einzigartiges Zusammenspiel aus Popfetcher und s9y

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Popfetcher Plugin does not show replies as comments

Post by garvinhicking » Thu Sep 05, 2019 9:19 pm

I see.

Yeah, I think that should all be salvageable (multiple mails, remove purgeEntry call, fix default setting for moderation). I‘ll get on it next week, ok?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
aschlemmer
Regular
Posts: 70
Joined: Fri Feb 23, 2007 7:13 pm
Location: Freiburg/Germany
Contact:

Re: Popfetcher Plugin does not show replies as comments

Post by aschlemmer » Thu Sep 05, 2019 9:22 pm

Thanks, Garvin! Take your time, I'm happy that you support us and this project. Have a good time until then.
www.ms-reporter.de
Pharma-unabhängige Infos für Multiple Sklerose-Betroffene
schnellze.it
Einzigartiges Zusammenspiel aus Popfetcher und s9y

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Popfetcher Plugin does not show replies as comments

Post by garvinhicking » Mon Sep 09, 2019 1:28 pm

So, I've just made a commit with version 1.48 of the plugin:

https://github.com/s9y/additional_plugi ... 4879e4b63b

In my local tests, this worked properly. Can you check it out?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
aschlemmer
Regular
Posts: 70
Joined: Fri Feb 23, 2007 7:13 pm
Location: Freiburg/Germany
Contact:

Re: Popfetcher Plugin does not show replies as comments

Post by aschlemmer » Mon Sep 09, 2019 1:37 pm

successful without errors, great!
How to limit the senders to exactly 2 e-mail senders, not allowing everyone?

Thanks :-)
www.ms-reporter.de
Pharma-unabhängige Infos für Multiple Sklerose-Betroffene
schnellze.it
Einzigartiges Zusammenspiel aus Popfetcher und s9y

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Popfetcher Plugin does not show replies as comments

Post by garvinhicking » Mon Sep 09, 2019 2:14 pm

Ah sorry, the code uses "," as a separator but I documented it to be ";". Just issued an update 1.49.

Then you should be able to enter "mail1@domain.com;mail2@domain.com" for the addresses.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
aschlemmer
Regular
Posts: 70
Joined: Fri Feb 23, 2007 7:13 pm
Location: Freiburg/Germany
Contact:

Re: Popfetcher Plugin does not show replies as comments

Post by aschlemmer » Mon Sep 09, 2019 7:15 pm

garvinhicking wrote:
Mon Sep 09, 2019 2:14 pm
Ah sorry, the code uses "," as a separator but I documented it to be ";". Just issued an update 1.49.

Then you should be able to enter "mail1@domain.com;mail2@domain.com" for the addresses.
now the comma "," is the working separator, the semicolon is not working - I guess that you simply mixed it up in the example.com-example above :-) ?

thank you very much for helping us!
www.ms-reporter.de
Pharma-unabhängige Infos für Multiple Sklerose-Betroffene
schnellze.it
Einzigartiges Zusammenspiel aus Popfetcher und s9y

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Popfetcher Plugin does not show replies as comments

Post by garvinhicking » Mon Sep 09, 2019 7:25 pm

No, I did fix it to use ;
You still have the old version, where the comma worked (which was not my intention)

See https://github.com/s9y/additional_plugi ... 3d0c2dea88 :)

Glad to have been of help!
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
aschlemmer
Regular
Posts: 70
Joined: Fri Feb 23, 2007 7:13 pm
Location: Freiburg/Germany
Contact:

Re: Popfetcher Plugin does not show replies as comments

Post by aschlemmer » Mon Sep 09, 2019 10:01 pm

I installed https://raw.githubusercontent.com/s9y/a ... etcher.php and it still requires a ;

what's my mistake?
www.ms-reporter.de
Pharma-unabhängige Infos für Multiple Sklerose-Betroffene
schnellze.it
Einzigartiges Zusammenspiel aus Popfetcher und s9y

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Popfetcher Plugin does not show replies as comments

Post by garvinhicking » Mon Sep 09, 2019 11:28 pm

The ; is what is proper:

$onlyfrom_parts = explode(';', $onlyfrom);

So either you mistyped and meant you need to use a comma, which is not what the code should do, or you actually are now using intended behavior :-D
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
aschlemmer
Regular
Posts: 70
Joined: Fri Feb 23, 2007 7:13 pm
Location: Freiburg/Germany
Contact:

Re: Popfetcher Plugin does not show replies as comments

Post by aschlemmer » Mon Sep 09, 2019 11:49 pm

great and sorry my confusion ...
www.ms-reporter.de
Pharma-unabhängige Infos für Multiple Sklerose-Betroffene
schnellze.it
Einzigartiges Zusammenspiel aus Popfetcher und s9y

Post Reply