[DEV] Post Love

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Satanasov
Registered User
Posts: 1176
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov
Contact:

Re: [BETA] Post Love

Post by Satanasov » Fri Dec 09, 2016 11:26 pm

Crusoeman wrote:Many thanks, that's good news. I've downloaded the Post Love extension and looked at the images directory.

I guess we could simply replace, for example, the 'Red-Heart-16' image with our own ''Like This' image, but keep the same file name, and it should work?

Image

I'm sure that we could change the file name but that must domino into other changes elsewhere. I'm trying to keep the whole process as simple as possible. I know it won't be a red heart but as long as we know what the file name represents it won't matter.

Tim
Yes. This is the easiest way to make the change ...
For list of all my extensions go to https://github.com/satanasov
If you want custom functions in some of my products - PM me and we will discuss it.

matzeoes
Registered User
Posts: 2
Joined: Sun Dec 11, 2016 9:17 pm

Re: [BETA] Post Love

Post by matzeoes » Sun Dec 11, 2016 9:21 pm

I get a
"AJAX error
not found"
when klicking on the heart on whichever topic.

can anyone help what to do, I tried installing the AJAX base, but the error is still there.

Satanasov
Registered User
Posts: 1176
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov
Contact:

Re: [BETA] Post Love

Post by Satanasov » Sat Dec 24, 2016 10:08 am

matzeoes wrote:I get a
"AJAX error
not found"
when klicking on the heart on whichever topic.

can anyone help what to do, I tried installing the AJAX base, but the error is still there.
Please provide error from server error log.
For list of all my extensions go to https://github.com/satanasov
If you want custom functions in some of my products - PM me and we will discuss it.

Satanasov
Registered User
Posts: 1176
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov
Contact:

Re: [BETA] Post Love

Post by Satanasov » Sat Dec 24, 2016 10:11 am

New 1.2.x branch is up and running for phpBB 3.2.x
For list of all my extensions go to https://github.com/satanasov
If you want custom functions in some of my products - PM me and we will discuss it.

Scones
Registered User
Posts: 4
Joined: Fri Sep 18, 2015 1:52 pm

Re: [BETA] Post Love

Post by Scones » Tue Jan 03, 2017 4:04 pm

I have just installed this on my site using the instructions on the first page of this thread.

The first time I clicked on a heart it appeared to work, i.e. the count went from 0 to 1 and the heart turned white. However, when I hovered my mouse over it, it didn't show the hint.

Then, subsequently, whenever I try to click on a heart, I just get an AJAX error 'Service Unavailable'.

What is the best way for me to proceed? I've had a look at the Apache error and access logs but found nothing.

I did try using this mod some time back but that time I didn't even get the heart to appear. I did click on delete data within the Customize tab in case that was an issue.

Scones
Registered User
Posts: 4
Joined: Fri Sep 18, 2015 1:52 pm

Re: [BETA] Post Love

Post by Scones » Tue Jan 03, 2017 4:30 pm

Scones wrote:
Tue Jan 03, 2017 4:04 pm
I have just installed this on my site using the instructions on the first page of this thread.

The first time I clicked on a heart it appeared to work, i.e. the count went from 0 to 1 and the heart turned white. However, when I hovered my mouse over it, it didn't show the hint.

Then, subsequently, whenever I try to click on a heart, I just get an AJAX error 'Service Unavailable'.

What is the best way for me to proceed? I've had a look at the Apache error and access logs but found nothing.

I did try using this mod some time back but that time I didn't even get the heart to appear. I did click on delete data within the Customize tab in case that was an issue.
After I enabled the MOD I also started getting other errors, including the 'Board index' no longer working.

I have completely removed /ext/anavaro and re-installed, and enabled it again in the Customize tab. Once again it worked once and then came up Service Unavailable. This does show up in the access log as

Code: Select all

88.211.105.30 - - [03/Jan/2017:16:28:59 +0000] "GET /unofficial/app.php/postlove/toggle/8086?_=1483460738140 HTTP/1.1" 503 4463

User avatar
GoBieN
Registered User
Posts: 538
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: [BETA] Post Love

Post by GoBieN » Wed Jan 04, 2017 8:20 pm

Error 503 is a webserver error: Service unavailable
There should be some more information in an error log somewhere.

Scones
Registered User
Posts: 4
Joined: Fri Sep 18, 2015 1:52 pm

Re: [BETA] Post Love

Post by Scones » Thu Jan 05, 2017 10:57 am

GoBieN wrote:
Wed Jan 04, 2017 8:20 pm
Error 503 is a webserver error: Service unavailable
There should be some more information in an error log somewhere.
That is what I expected, but there wasn't any. I have just retried the MOD and got exactly the same again.

I clicked on the red heart and the first 3 entries in access_log all with status 200.

The heart turned white. I then clicked on it again, got the AJAX error and the single entry in access_log

There were no entries in either the main error_log or the vhost's error_log

Code: Select all

88.211.105.30 - - [05/Jan/2017:10:45:41 +0000] "GET /unofficial/styles/prosilver/theme/images/loading.gif HTTP/1.1" 200 1320
88.211.105.30 - - [05/Jan/2017:10:45:41 +0000] "GET /unofficial/app.php/postlove/toggle/8120?_=1483613131588 HTTP/1.1" 200 44
88.211.105.30 - - [05/Jan/2017:10:45:41 +0000] "GET /unofficial/ext/anavaro/postlove/styles/all/theme/images/heart-white-16.png HTTP/1.1" 200 1465

88.211.105.30 - - [05/Jan/2017:10:45:53 +0000] "GET /unofficial/app.php/postlove/toggle/8120?_=1483613131589 HTTP/1.1" 503 3848

User avatar
GoBieN
Registered User
Posts: 538
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: [BETA] Post Love

Post by GoBieN » Thu Jan 05, 2017 10:07 pm

Some kind of protection of the webhost that prevents loading a page to much in a certain timeframe?

Scones
Registered User
Posts: 4
Joined: Fri Sep 18, 2015 1:52 pm

Re: [BETA] Post Love

Post by Scones » Fri Jan 06, 2017 9:58 am

GoBieN wrote:
Thu Jan 05, 2017 10:07 pm
Some kind of protection of the webhost that prevents loading a page to much in a certain timeframe?
I do not have any such protection on my server, and to be honest the volume of traffic on my server would never trigger such a protection. I only host 4 domains, of which only this one has http traffic, The other three have minimal email traffic but not web access at all.

The fact that the response has a size (3848 bytes) leads me to think that the process starts and then dies for some reason. Unfortunately, a quick look at the code has told me that I haven't got a clue where to start debugging the problem

User avatar
GoBieN
Registered User
Posts: 538
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: [BETA] Post Love

Post by GoBieN » Fri Jan 06, 2017 11:22 pm

If you use webmaster tools (F12) you might see some text response to the request.

adoberg
Registered User
Posts: 1
Joined: Sat Jan 07, 2017 3:17 pm

Re: [BETA] Post Love

Post by adoberg » Sat Jan 07, 2017 3:25 pm

In my case the ajax error came from file:
anavaro\postlove\controller\ajaxify.php

$this->notifyhelper->notify('remove', $row['topic_id'], $post, $row['post_subject'], $row['poster'], $this->user->data['user_id']);

Notifyhelper is used twice in ajaxify.php (line 86 and 98 in the latest release).
Commented those lines out and go no ajax error (notification are not sent tho).
Working on fixing sending the notifications.

Edit: So the problem seems occour when Debug is set to true in config.php (define('DEBUG', true)).
You should also purge the cache.

pszyman
Registered User
Posts: 90
Joined: Tue Feb 25, 2003 10:52 am
Location: Dublin

Re: [BETA] Post Love

Post by pszyman » Sun Jan 08, 2017 10:03 am

I have a clean 3.2 install with added post love.

When I click like, the heart doesn't change and counter stays 0 but refreshing the page I see the like did work. Is just a refresh issue when like'ing. The other way around it works fine. Dislike functions as it should.

Is this a know issue with an upcoming fix?

bvetter
Registered User
Posts: 10
Joined: Sun Jan 08, 2017 3:14 pm
Location: Berlin, Germany
Contact:

Re: [BETA] Post Love

Post by bvetter » Sun Jan 08, 2017 3:18 pm

After update of my board (3.1.10>3.2.0) and the post love extension (1.1>1.2), I get the following php error (on Apache-Log):
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function load_users() on null in /var/www/vhosts/amzecho.de/httpdocs_test/ext/anavaro/postlove/notification/postlove.php:141\nStack trace:\n#0 /var/www/vhosts/amzecho.de/httpdocs_test/phpbb/notification/type/base.php(291): anavaro\\postlove\\notification\\postlove->get_avatar()\n#1 /var/www/vhosts/amzecho.de/httpdocs_test/includes/functions.php(4331): phpbb\\notification\\type\\base->prepare_for_display()\n#2 /var/www/vhosts/amzecho.de/httpdocs_test/index.php(238): page_header('Foren-\\xC3\\x9Cbersich...', true)\n#3 {main}\n thrown in /var/www/vhosts/amzecho.de/httpdocs_test/ext/anavaro/postlove/notification/postlove.php on line 141\n'
I can't open the forum page (HTTP ERROR 500). :roll:
https://www.alefo.de - the inofficial german alexa and echo community
https://www.gassistant.de - the inofficial german google assistant community

abravorus
Registered User
Posts: 3
Joined: Mon Feb 28, 2005 12:01 pm

Re: [BETA] Post Love

Post by abravorus » Mon Jan 09, 2017 6:55 pm

I have phpBB 3.1.10 with Post Love extension version 1.0.2.123. And this pair worked smooth. Before upgrading to phpBB 3.2.0/Post Love 1.2 I decided first to upgrade 3.1.10 to latest stable Post Love 1.1.2

According to instructions I disabled the extension, removed everything from ext/anavaro folder, clone the extension from git and reenabled it (phpBB has seen version 1.1.2, that's ok).
The result - HTTP error 500 of all forum pages, except admin.
An excerpt from server error log:

2017/01/09 20:42:40 [error] 21759#0: *8148562 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException' with message 'You have requested a non-existent service "notification.type.postlove".' in /.../f3/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php:806
Stack trace:
#0 /.../f3/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php(444): Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition('notification.ty...')
#1 /.../f3/phpbb/notification/manager.php(905): Symfony\Component\DependencyInjection\ContainerBuilder->get('notification.ty...')
#2 /.../f3/phpbb/notification/manager.php(885): phpbb\notification\manager->load_object('notification.ty...')
#3 /.../f3/phpbb/notification/manager.php(230): phpbb\notification\mana" while reading response header from upstream, client: 91.122.156.237, server: terijoki.spb.ru, request: "GET /f3/viewtopic.php?f=3&t=7829&hilit=%D0%A6%D0%B5%D1%86%D0%B8%D0%BB%D0%B8%D1%8F+%D0%93%D0%B0%D0%BD%D0%B7%D0%B5%D0%BD&start=1065 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "terijoki.spb.ru"

Ok, I reverted back to Post Love 1.0.2.123 from backup (disable extension, copy 1.0.2.123 backup postlove folder into ext/anavaro, enabled extension). No http errors now, but there are no heart icons now, only number of likes previously set, no possibility to like, nothing to click.
An examle of generated html code:

<div style="float: right; margin-top: 5px; margin-bottom: 5px;" class="postlove">
<a href="./app.php/postlove/togle/104263" data-ajax="togle_love"><span class="liked" id="likeimg_104263"></span></a> <span title="abravo" style="font-size: 1.3em; vertical-align: top;" id="like_104263">1</span> x
</div>

and corresponding screenshot:
Image

Questions - whats wrong in both cases, with 1.1.2 and returning to 1.0.2.123.

Post Reply

Return to “Extensions in Development”