[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!
Anti-Spam Guide
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: 1193
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov
Contact:

Re: [BETA] Post Love

Post by Satanasov » Tue Nov 03, 2015 9:51 pm

dpgnyf wrote:Hi and thank you for your Mod. I collected some information about this error. Board version is 3.1.6.

Output from debug console:

Code: Select all

AJAX error. status: error, message: Service Unavailable core.js:262:5
But I think the more useful information comes when I try to open the Love-URL (f.e. [ROOT]/app.php/postlove/toggle/347549) directly:

Code: Select all

SQL ERROR [ mysql4 ]

Duplicate entry 'notification.type.postlove' for key 'type' [1062]

SQL

INSERT INTO phpbb3_notification_types (notification_type_name, notification_type_enabled) VALUES ('notification.type.postlove', 1)

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysql.php
LINE: 181
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysql->sql_query()

FILE: [ROOT]/phpbb/notification/manager.php
LINE: 953
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/phpbb/notification/type/base.php
LINE: 133
CALL: phpbb\notification\manager->get_notification_type_id()

FILE: [ROOT]/phpbb/notification/manager.php
LINE: 909
CALL: phpbb\notification\type\base->set_notification_manager()

FILE: [ROOT]/phpbb/notification/manager.php
LINE: 885
CALL: phpbb\notification\manager->load_object()

FILE: [ROOT]/phpbb/notification/manager.php
LINE: 353
CALL: phpbb\notification\manager->get_item_type_class()

FILE: [ROOT]/ext/anavaro/postlove/controller/notifyhelper.php
LINE: 75
CALL: phpbb\notification\manager->add_notifications()

FILE: [ROOT]/ext/anavaro/postlove/controller/ajaxify.php
LINE: 86
CALL: anavaro\postlove\controller\notifyhelper->notify()

FILE: (not given by php)
LINE: (not given by php)
CALL: anavaro\postlove\controller\ajaxify->base()

FILE: [ROOT]/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php
LINE: 117
CALL: call_user_func_array()

FILE: [ROOT]/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php
LINE: 61
CALL: Symfony\Component\HttpKernel\HttpKernel->handleRaw()

FILE: [ROOT]/app.php
LINE: 33
CALL: Symfony\Component\HttpKernel\HttpKernel->handle()
I checked the database and found that the entry is already there:

Code: Select all

notification_type_id 	notification_type_name 	notification_type_enabled
19 	notification.type.postlove 	1
If I deleted the notification type, a click on the heart works exactly one time, then the error comes again.

Ok ... this extension is working on my board and it is used on daily basis. I will try to replicate it in test environment ...
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.

gajop
Registered User
Posts: 2
Joined: Mon Nov 09, 2015 12:01 am

Re: [BETA] Post Love

Post by gajop » Fri Nov 13, 2015 12:36 am

We've installed it on our test server and two users are already reporting the issue : https://springrts.com/phpbb/download/file.php?id=9730

Any additional details you may want me to provide?

Tarantino
Registered User
Posts: 768
Joined: Sat Feb 18, 2012 1:51 pm
Contact:

Re: [BETA] Post Love

Post by Tarantino » Fri Nov 13, 2015 2:05 am

I can put working the hearts, but if I Choose the other theme format, it doesnt appear, why?

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

Re: [BETA] Post Love

Post by Satanasov » Fri Nov 13, 2015 10:34 am

gajop wrote:We've installed it on our test server and two users are already reporting the issue : https://springrts.com/phpbb/download/file.php?id=9730

Any additional details you may want me to provide?

Please show me the console log from the click. There should be some info regarding why and what service is unavailable.

And the error apache 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.

sanchobor
Registered User
Posts: 1
Joined: Fri Nov 13, 2015 11:16 am

Re: [BETA] Post Love

Post by sanchobor » Fri Nov 13, 2015 11:30 am

Hi there,

Same error here: AJAX error Service Unavailable on phpBB 3.1.6 board

Console: /app.php/postlove/toggle/148331?_=1447413235925 - 503 Service Unavailable

Code: Select all

Обща грешка
SQL ERROR [ mysqli ]

Duplicate entry 'notification.type.postlove' for key 'type' [1062]

SQL

INSERT INTO phpbb_notification_types (notification_type_name, notification_type_enabled) VALUES ('notification.type.postlove', 1)

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/notification/manager.php
LINE: 953
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/phpbb/notification/manager.php
LINE: 539
CALL: phpbb\notification\manager->get_notification_type_id()

FILE: [ROOT]/ext/anavaro/postlove/controller/notifyhelper.php
LINE: 78
CALL: phpbb\notification\manager->delete_notifications()

FILE: [ROOT]/ext/anavaro/postlove/controller/ajaxify.php
LINE: 98
CALL: anavaro\postlove\controller\notifyhelper->notify()

FILE: (not given by php)
LINE: (not given by php)
CALL: anavaro\postlove\controller\ajaxify->base()

FILE: [ROOT]/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php
LINE: 117
CALL: call_user_func_array()

FILE: [ROOT]/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php
LINE: 61
CALL: Symfony\Component\HttpKernel\HttpKernel->handleRaw()

FILE: [ROOT]/app.php
LINE: 33
CALL: Symfony\Component\HttpKernel\HttpKernel->handle()

Power2All
Registered User
Posts: 6
Joined: Sun Jun 17, 2007 2:02 pm

Re: [BETA] Post Love

Post by Power2All » Fri Nov 20, 2015 9:08 am

Tried it out too.
Got this error:

GET http://www.ddrnl.com/app.php/postlove/t ... 8010454855 404 (Not Found)m.ajaxTransport.a.send @ jquery-1.11.3.min.js:5m.extend.ajax @ jquery-1.11.3.min.js:5phpbb.ajaxify.$elements.on.sendRequest @ core.js?assets_version=24:389(anonymous function) @ core.js?assets_version=24:411m.event.dispatch @ jquery-1.11.3.min.js:4m.event.add.r.handle @ jquery-1.11.3.min.js:4
core.js?assets_version=24:262 AJAX error. status: error, message: Not Found

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

Re: [BETA] Post Love

Post by Satanasov » Fri Nov 20, 2015 4:58 pm

sanchobor wrote:Hi there,

Same error here: AJAX error Service Unavailable on phpBB 3.1.6 board

Console: /app.php/postlove/toggle/148331?_=1447413235925 - 503 Service Unavailable

Code: Select all

Обща грешка
SQL ERROR [ mysqli ]

Duplicate entry 'notification.type.postlove' for key 'type' [1062]

SQL

INSERT INTO phpbb_notification_types (notification_type_name, notification_type_enabled) VALUES ('notification.type.postlove', 1)

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/notification/manager.php
LINE: 953
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/phpbb/notification/manager.php
LINE: 539
CALL: phpbb\notification\manager->get_notification_type_id()

FILE: [ROOT]/ext/anavaro/postlove/controller/notifyhelper.php
LINE: 78
CALL: phpbb\notification\manager->delete_notifications()

FILE: [ROOT]/ext/anavaro/postlove/controller/ajaxify.php
LINE: 98
CALL: anavaro\postlove\controller\notifyhelper->notify()

FILE: (not given by php)
LINE: (not given by php)
CALL: anavaro\postlove\controller\ajaxify->base()

FILE: [ROOT]/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php
LINE: 117
CALL: call_user_func_array()

FILE: [ROOT]/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php
LINE: 61
CALL: Symfony\Component\HttpKernel\HttpKernel->handleRaw()

FILE: [ROOT]/app.php
LINE: 33
CALL: Symfony\Component\HttpKernel\HttpKernel->handle()
This should not be so... I will take a look at it.
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.

trelken
Registered User
Posts: 18
Joined: Thu Jun 10, 2010 9:01 pm

Re: [BETA] Post Love

Post by trelken » Wed Dec 02, 2015 9:44 pm

I just upgraded from phpbb 3.0 to 3.1.6 and this is the first extension I am attempting. I got it installed but the mouse over display isn't working and when you click the heart a second time I get an Ajax error. Any ideas?

Thanks,
Trent

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

Re: [BETA] Post Love

Post by Satanasov » Thu Dec 03, 2015 6:25 am

trelken wrote:I just upgraded from phpbb 3.0 to 3.1.6 and this is the first extension I am attempting. I got it installed but the mouse over display isn't working and when you click the heart a second time I get an Ajax error. Any ideas?

Thanks,
Trent
Please review the apache 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.

trelken
Registered User
Posts: 18
Joined: Thu Jun 10, 2010 9:01 pm

Re: [BETA] Post Love

Post by trelken » Thu Dec 03, 2015 4:28 pm

I got the logs from the host, I am on a shared server so I don't have direct access. Any help for resolving this is appreciated. My board doesn't have a lot of traffic, the db is fairly big but not more than 10 concurrent users so I don't think this is traffic related. Anytime you try to like a post that is already liked you get this Ajax error. You also get it randomly when liking a post with zero likes.

Here are the results, the Eduard timestamps are from the chat window with support.

Eduard: at 9:25:53
[Thu Dec 03 06:33:24 2015] [error] mod_fcgid: domain=www.azmustangs.com too many /dh/cgi-system/php55.cgi processes (current:8, max:8), skip the spawn request
Eduard: at 9:25:53
[Thu Dec 03 06:33:24 2015] [error] mod_fcgid: domain=www.azmustangs.com too many /dh/cgi-system/php55.cgi processes (current:8, max:8), skip the spawn request
Eduard: at 9:25:53
[Thu Dec 03 06:33:25 2015] [error] mod_fcgid: domain=www.azmustangs.com too many /dh/cgi-system/php55.cgi processes (current:8, max:8), skip the spawn request
Eduard: at 9:25:53
[Thu Dec 03 06:33:26 2015] [error] mod_fcgid: domain=www.azmustangs.com too many /dh/cgi-system/php55.cgi processes (current:8, max:8), skip the spawn request
Eduard: at 9:25:53
[Thu Dec 03 06:33:27 2015] [error] mod_fcgid: domain=www.azmustangs.com too many /dh/cgi-system/php55.cgi processes (current:8, max:8), skip the spawn request
Eduard: at 9:25:53

Eduard: at 9:26:30
so these errors mean that the site was found to be spawning too many php requests and exceeding the server limits of how many php processes can be spawned at one time. This could be partly due to traffic and also how you have your site's web application setup.

thelordz
Registered User
Posts: 6
Joined: Mon Dec 14, 2015 12:17 pm

Re: [BETA] Post Love

Post by thelordz » Mon Dec 14, 2015 12:28 pm

Hello,

I think it's an valuable extension so I've done a quick debug for it.
That ajax error is thrown by an unassign variable, mostly because of a quick code writing I guess.

Here is what you've got to do:
Edit this file: /ext/anavaro/postlove/controller/ajaxify.php

At line 97 you'll find this: $this->db->sql_freeresult($result);
Please change it with: $row = $this->db->mysql_free_result($result);
(The $row var is needed for the notify helper function below.)

And that's all, enjoy it because it's a very nice ext.
Everything works great now, tested with 3.1.6.

Btw, GJ for the author!

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

Re: [BETA] Post Love

Post by Satanasov » Mon Dec 14, 2015 9:55 pm

thelordz wrote:Hello,

I think it's an valuable extension so I've done a quick debug for it.
That ajax error is thrown by an unassign variable, mostly because of a quick code writing I guess.

Here is what you've got to do:
Edit this file: /ext/anavaro/postlove/controller/ajaxify.php

At line 97 you'll find this: $this->db->sql_freeresult($result);
Please change it with: $row = $this->db->mysql_free_result($result);
(The $row var is needed for the notify helper function below.)

And that's all, enjoy it because it's a very nice ext.
Everything works great now, tested with 3.1.6.

Btw, GJ for the author!
I think you are using old code ...
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.

pantherfan
Registered User
Posts: 44
Joined: Thu Nov 12, 2015 12:15 am
Name: Tangela

Re: [BETA] Post Love

Post by pantherfan » Tue Dec 15, 2015 4:46 pm

Seeing this.
SQL ERROR [ mysqli ]

Duplicate entry 'notification.type.postlove' for key 'type' [1062]

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
I clicked the like button on a post twice, trying to toggle the like. And then when the user who received 2 likes on a post from the same person tries to log in, they get that error.

thelordz
Registered User
Posts: 6
Joined: Mon Dec 14, 2015 12:17 pm

Re: [BETA] Post Love

Post by thelordz » Tue Dec 15, 2015 6:09 pm

Satanasov wrote: I think you are using old code ...
You think wrong :-)
This error is still present in the last git repo.

Tested with 3.1.6 and all is functional with that modification.

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

Re: [BETA] Post Love

Post by Satanasov » Tue Dec 15, 2015 6:18 pm

thelordz wrote:
Satanasov wrote: I think you are using old code ...
You think wrong :-)
This error is still present in the last git repo.

Tested with 3.1.6 and all is functional with that modification.
This is wrong ... I just saw what you were doing ... this $row is defined at line 65 ... and it is a different $row ...

I don't think your previous post fixes something ...
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.

Post Reply

Return to “Extensions in Development”