Page 4 of 22

Re: [ALPHA] Subject Prefix

Posted: Sun May 30, 2010 8:38 pm
by Erik Frèrejean
Per t_backoff, the "style" information the error is talking about is stored in the "modx.prosilver.en.xsl". As I don't want this file in my development environment it is also missing from the package as the alpha and beta packages are generated by GitHub straight from the repository.

Re: [ALPHA] Subject Prefix

Posted: Mon May 31, 2010 5:15 pm
by VSE
Error in your installer instructions:

looks for "style/prosilver/template/viewtopic_print.html"
should be "styles/prosilver/template/viewtopic_print.html"

EDIT: I installed it... Created an ACP Module for it, and this error happened after trying to create a Prefix:
General Error
SQL ERROR [ mysqli ]

Table 'vanilla.subject_prefix_forums' doesn't exist [1146]

SQL

SELECT * FROM subject_prefix_forums

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: includes/mods/subject_prefix/subject_prefix_cache.php
LINE: 106
CALL: dbal_mysqli->sql_query()

FILE: includes/acp/acp_subject_prefix.php
LINE: 154
CALL: subject_prefix_cache->obtain_prefix_forum_list()

FILE: includes/functions_module.php
LINE: 507
CALL: acp_subject_prefix->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
Note: 'vanilla' is the name of the database.

Re: [ALPHA] Subject Prefix

Posted: Mon May 31, 2010 5:49 pm
by tbackoff
VSE wrote:EDIT: I installed it... Created an ACP Module for it, and this error happened after trying to create a Prefix
READ ME

Re: [ALPHA] Subject Prefix

Posted: Mon May 31, 2010 11:29 pm
by VSE
t_backoff wrote:Check the NOTICE at the bottom of this post.
thanks

Re: [ALPHA] Subject Prefix

Posted: Wed Jun 02, 2010 7:43 am
by VSE
I tried the Quick Mod tool pull-down menu method for changing a Subject Prefix, but it failed.
General Error
Module not accessible
I can see that the URL being generated looks suspect:

Code: Select all

http://localhost:8888/phpbb3/mcp.php?i=subject_prefix&mode=subject_prefix_qc&f=2&t=1&redirect=.%2Fviewtopic.php

Re: [ALPHA] Subject Prefix

Posted: Wed Jun 02, 2010 4:13 pm
by thesecret
great one,,
hope to see
1. the ability to have specific prefix for a certain forum(s)
2. Group permission to use certain prefix

Re: [ALPHA] Subject Prefix

Posted: Wed Jun 02, 2010 9:08 pm
by Erik Frèrejean
The first one is already included ;). The second one won't be added for 1.0.0.

Re: [ALPHA] Subject Prefix

Posted: Thu Jun 03, 2010 4:58 pm
by kida7
Every times I add a prefix from ACP, I have to delete all caches. You shoud change it to delete it's cache automatically when you add new prefix title :)

Re: [ALPHA] Subject Prefix

Posted: Sun Jun 06, 2010 12:04 am
by Gazanimal
NIce.

Been waiting for something like this for a while & can't wait until you get an official release on it so I can use it on my board.

Top work & thanks for creating it. ;)

Re: [BETA] Subject Prefix

Posted: Tue Jun 08, 2010 1:25 pm
by Erik Frèrejean
I've just tagged the first Beta release of this MOD. This release includes some minor fixes and packages a MOD installer. Could everyone give the installer a go (with and without AutoMOD) to make sure everything runs as expected.
If this release doesn't cause to many issues I probably can skip the RCs and submit this MOD to the MODDB by the end of this week.

[edit]
NOTICE:
With this version the minimum requirements have been raised to php 5.1.0!

Re: [BETA] Subject Prefix

Posted: Tue Jun 08, 2010 5:10 pm
by tbackoff
  • I had to remove subject_prefix_core:: from line 72 and line 82 in install/install_versions.php
  • I had to comment out the language_file line to get the installer to run (it said the file couldn't be opened, but I checked and it was there.
  • I got a fail on the install, here is the file it gave me:
    SUBJECTPREFIX
    PHP Version: 5.2.6
    DBMS: MySQL(i) 5.0.51b-community-nt-log
    phpBB3 Version: 3.0.7-PL1

    Adding acp module: ACP_SUBJECT_PREFIX
    ERROR: The parent category specified for this module does not exist.

    Adding acp module: ACP_SUBJECT_PREFIX
    ERROR: The parent category specified for this module does not exist.

    Adding a new database table: SUBJECT_PREFIX_TABLE
    SQL ERROR Invalid default value for 'prefix_id'

    Adding a new column named subject_prefix_id to table TOPICS_TABLE
    SQL ERROR Table 'phpbb3.topics_table' doesn't exist

    Adding a key named topic_first_post_id to table TOPICS_TABLE
    SQL ERROR Table 'phpbb3.topics_table' doesn't exist

    Adding a key named subject_prefix_id to table TOPICS_TABLE
    SQL ERROR Table 'phpbb3.topics_table' doesn't exist
    The last 3 don't make sense (of course there's a topics_table. :?
I'll have to manually add these, then I can test.

Re: [BETA] Subject Prefix

Posted: Tue Jun 08, 2010 5:39 pm
by tbackoff
Also, I'm still getting the
The submitted form was invalid. Try submitting again.
message. It seems to only happen when I use the "change topic prefix" tool in viewtopic.

Re: [BETA] Subject Prefix

Posted: Tue Jun 08, 2010 6:34 pm
by VSE
Installed via Automod just fine...

install/index.php file has a problem:

Code: Select all

$language_file = 'mods/subject_prefix/subject_prefix_common.php';
should be (no .php at end):

Code: Select all

$language_file = 'mods/subject_prefix/subject_prefix_common';
subject_prefix_install.xml has a problem:
It does not copy the whole install folder, just its index.php so the file install_versions.php is not present and this causes the installer file to fail.

Finally, these errors occurred after running the install:
SUBJECTPREFIX
PHP Version: 5.2.11
DBMS: MySQL(i) 5.1.37
phpBB3 Version: 3.0.7-PL1

Adding a new database table: subject_prefix
SQL ERROR Invalid default value for 'prefix_id'

Adding a new column named subject_prefix_id to table TOPICS_TABLE
SQL ERROR Table 'vanilla.TOPICS_TABLE' doesn't exist

Adding a key named topic_first_post_id to table TOPICS_TABLE
SQL ERROR Table 'vanilla.TOPICS_TABLE' doesn't exist

Adding a key named subject_prefix_id to table TOPICS_TABLE
SQL ERROR Table 'vanilla.TOPICS_TABLE' doesn't exist
Some of these problems are because constants need not be enclosed in quotes, ie:

Code: Select all

'table_column_add' => array(
            array('TOPICS_TABLE', 'subject_prefix_id', array('UINT', '0')) 
Should be:

Code: Select all

'table_column_add' => array(
            array(TOPICS_TABLE, 'subject_prefix_id', array('UINT', '0')) 
Change all three occurrences of 'TOPICS_TABLE' to just TOPICS_TABLE :)

and then that leaves 1 remaining install issue for me:
Adding a new database table: subject_prefix
SQL ERROR Invalid default value for 'prefix_id'
Finally, I can't find the ACP module... Because the parent module ACP_CAT_MODS should be ACP_CAT_DOT_MODS

EDIT:
And here is a question: Why do the two tables this MOD adds not use table prefixes, like phpbb_ ?

PS: I think the Subject prefix font-size looks too big in viewtopic, due to the css change that sets it to 1.2em... Just my personal opinion... :lol:

Re: [BETA] Subject Prefix

Posted: Wed Jun 09, 2010 4:44 am
by VSE
Found another buggie:

in includes/mods/subject_prefix/subject_prefix_core.php

At the end of line 204, there is an html tag

Code: Select all

</options>
It should be

Code: Select all

</option>

Re: [BETA] Subject Prefix

Posted: Wed Jun 09, 2010 3:37 pm
by Erik Frèrejean
t_backoff wrote:
  • I had to remove subject_prefix_core:: from line 72 and line 82 in install/install_versions.php
  • I had to comment out the language_file line to get the installer to run (it said the file couldn't be opened, but I checked and it was there.
  • I got a fail on the install, here is the file it gave me:
    SUBJECTPREFIX
    PHP Version: 5.2.6
    DBMS: MySQL(i) 5.0.51b-community-nt-log
    phpBB3 Version: 3.0.7-PL1

    Adding acp module: ACP_SUBJECT_PREFIX
    ERROR: The parent category specified for this module does not exist.

    Adding acp module: ACP_SUBJECT_PREFIX
    ERROR: The parent category specified for this module does not exist.

    Adding a new database table: SUBJECT_PREFIX_TABLE
    SQL ERROR Invalid default value for 'prefix_id'

    Adding a new column named subject_prefix_id to table TOPICS_TABLE
    SQL ERROR Table 'phpbb3.topics_table' doesn't exist

    Adding a key named topic_first_post_id to table TOPICS_TABLE
    SQL ERROR Table 'phpbb3.topics_table' doesn't exist

    Adding a key named subject_prefix_id to table TOPICS_TABLE
    SQL ERROR Table 'phpbb3.topics_table' doesn't exist
    The last 3 don't make sense (of course there's a topics_table. :?
I'll have to manually add these, then I can test.
Looks like I did something wrong with moving stuff around in the installer :/. Lemme see