Topic on Extension talk:PageVariable

Issue fixed on database prefix

1
90.46.107.252 (talkcontribs)

My mediawiki database is prefixed coetus_coetus.csmw

When I created the table as coetus_coetus.pagevariable_data, the write & delete functions of this extension requested for the table to be called coetus_coetus.csmw_pagevariable_data and I changed the table name to fit their need.

But the setv function wants to read from coetus_coetus.pagevariable_data , i.e. not from the same database. When I dupplicate coetus_coetus.csmw_pagevariable_data into coetus_coetus.pagevariable_data, the reading works fine, but the new writings or alterations of values of variables are not read.

I'm using currently mediawiki version 1.20.2 Cleary, with my installation, the write database and the read database don't manage prefixes identically.

It seems I could correct the issue by just amending a single line of the code within my own implementation : I changed (in getv function)

$query = "select distinct pgv_value from pagevariable_data where pgv_entity = '$entity' and pgv_attribute='$attribute'";

into

$query = "select distinct pgv_value from csmw_pagevariable_data where pgv_entity = '$entity' and pgv_attribute='$attribute'";
Reply to "Issue fixed on database prefix"