[3.2][BETA] User Topic Count

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)
User avatar
dingus33
Registered User
Posts: 127
Joined: Fri Sep 29, 2017 11:11 am

Re: [3.2][BETA] User Topic Count

Post by dingus33 » Tue Sep 24, 2019 6:15 pm

dear martti,

thank you for your exemplary extensions and hard work. you make cool stuff.

i just tested this extension, and it did not work for me.

my setup:

phpBB 3.2.8
PHP 7.1.32
PostgreSQL 9.6.15

i got this error when trying to enable the extension:

Code: Select all

General Error
SQL ERROR [ postgres ]

ERROR: column "u.user_id" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: select count(t.topic_id) as topic_count, u.user_id, u.user_t... ^ []

SQL

select count(t.topic_id) as topic_count, u.user_id, u.user_topic_count from phpbb_topics t, phpbb_users u where t.topic_visibility = 1 and t.topic_poster = u.user_id and u.user_id >= 0 and u.user_id <= 1000 and u.user_id <> 1 group by t.topic_poster having count(t.topic_id) <> u.user_topic_count

BACKTRACE

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

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

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

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

FILE: [ROOT]/ext/marttiphpbb/usertopiccount/service/update.php
LINE: 50
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/ext/marttiphpbb/usertopiccount/service/update.php
LINE: 73
CALL: marttiphpbb\usertopiccount\service\update->for_sql_where()

FILE: [ROOT]/ext/marttiphpbb/usertopiccount/migrations/mgr_2.php
LINE: 42
CALL: marttiphpbb\usertopiccount\service\update->for_user_range()

FILE: (not given by php)
LINE: (not given by php)
CALL: marttiphpbb\usertopiccount\migrations\mgr_2->update_user_topic_count()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 714
CALL: call_user_func_array()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 661
CALL: phpbb\db\migrator->run_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 436
CALL: phpbb\db\migrator->process_data_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 288
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 241
CALL: phpbb\db\migrator->update_do()

FILE: [ROOT]/phpbb/extension/base.php
LINE: 78
CALL: phpbb\db\migrator->update()

FILE: [ROOT]/ext/marttiphpbb/usertopiccount/ext.php
LINE: 51
CALL: phpbb\extension\base->enable_step()

FILE: [ROOT]/phpbb/extension/manager.php
LINE: 190
CALL: marttiphpbb\usertopiccount\ext->enable_step()

FILE: [ROOT]/includes/acp/acp_extensions.php
LINE: 213
CALL: phpbb\extension\manager->enable_step()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: acp_extensions->main()

FILE: [ROOT]/adm/index.php
LINE: 82
CALL: p_master->load_active()

User avatar
martti
Registered User
Posts: 764
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][BETA] User Topic Count

Post by martti » Mon Sep 30, 2019 7:23 am

dingus33 wrote:
Tue Sep 24, 2019 6:15 pm
dear martti,

thank you for your exemplary extensions and hard work. you make cool stuff.

i just tested this extension, and it did not work for me.

my setup:

phpBB 3.2.8
PHP 7.1.32
PostgreSQL 9.6.15

i got this error when trying to enable the extension:

Code: Select all

General Error
SQL ERROR [ postgres ]

ERROR: column "u.user_id" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: select count(t.topic_id) as topic_count, u.user_id, u.user_t... ^ []

SQL

select count(t.topic_id) as topic_count, u.user_id, u.user_topic_count from phpbb_topics t, phpbb_users u where t.topic_visibility = 1 and t.topic_poster = u.user_id and u.user_id >= 0 and u.user_id <= 1000 and u.user_id <> 1 group by t.topic_poster having count(t.topic_id) <> u.user_topic_count

BACKTRACE

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

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

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

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

FILE: [ROOT]/ext/marttiphpbb/usertopiccount/service/update.php
LINE: 50
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/ext/marttiphpbb/usertopiccount/service/update.php
LINE: 73
CALL: marttiphpbb\usertopiccount\service\update->for_sql_where()

FILE: [ROOT]/ext/marttiphpbb/usertopiccount/migrations/mgr_2.php
LINE: 42
CALL: marttiphpbb\usertopiccount\service\update->for_user_range()

FILE: (not given by php)
LINE: (not given by php)
CALL: marttiphpbb\usertopiccount\migrations\mgr_2->update_user_topic_count()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 714
CALL: call_user_func_array()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 661
CALL: phpbb\db\migrator->run_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 436
CALL: phpbb\db\migrator->process_data_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 288
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 241
CALL: phpbb\db\migrator->update_do()

FILE: [ROOT]/phpbb/extension/base.php
LINE: 78
CALL: phpbb\db\migrator->update()

FILE: [ROOT]/ext/marttiphpbb/usertopiccount/ext.php
LINE: 51
CALL: phpbb\extension\base->enable_step()

FILE: [ROOT]/phpbb/extension/manager.php
LINE: 190
CALL: marttiphpbb\usertopiccount\ext->enable_step()

FILE: [ROOT]/includes/acp/acp_extensions.php
LINE: 213
CALL: phpbb\extension\manager->enable_step()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: acp_extensions->main()

FILE: [ROOT]/adm/index.php
LINE: 82
CALL: p_master->load_active()
Probably I'll have to try to simplify the query to ensure compatibility across database types.

User avatar
eunaumtenhoid
Registered User
Posts: 898
Joined: Wed Jun 03, 2009 12:46 am
Location: ????

Re: [3.2][BETA] User Topic Count

Post by eunaumtenhoid » Sun Oct 20, 2019 1:10 pm

it would be very perfect to show the percentage as well as the posts and be compatible with autogroup
My translations of the extensions for Brazilian Portuguese
https://github.com/phpBBTraducoes

User avatar
strelok-by
Registered User
Posts: 120
Joined: Fri Nov 21, 2014 10:22 am
Location: Mozyr / Belarus
Name: Stanislav
Contact:

Re: [3.2][BETA] User Topic Count

Post by strelok-by » Wed Nov 27, 2019 10:42 am

russian language:
profile.php
(550 Bytes) Downloaded 4 times

Post Reply

Return to “Extensions in Development”