User talk:MarkAHershberger

Jump to: navigation, search

About this board

Previous discussion was archived at User talk:MarkAHershberger/Archive 1 on 2016-08-16.

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL

Extension:HitCounter in mediawiki 1.28.0 Database Error 1054

3
Xk casper (talkcontribs)

If you setup the HitCounter extension version 1.28.0 it will show up the error 1054 like:

Query: SELECT page_namespace,page_title FROM `page` WHERE page_namespace = '0' AND page_is_redirect = '0' ORDER BY page_counter DESC LIMIT 6 Function: DynamicPageListHooks::renderDynamicPageList Error: 1054 Unknown column 'page_counter' in 'order clause' (localhost)

After add the code:

    // process the query,change fields into page and hit_counter by casper 2017.01.20
    if($orderMethod == 'popularity'){
        $tables[] = 'hit_counter';//
        $join["hit_counter"] = array( 'LEFT JOIN','page.page_id=hit_counter.page_id' );
        $res = $dbr->select( $tables, $fields, $where, __METHOD__, $options, $join );
    } else{
        $res = $dbr->select( $tables, $fields, $where, __METHOD__, $options, $join );
    }

This problem will be solved。

MarkAHershberger (talkcontribs)

Please let me know which file you modified so I can create a patch.

Xk casper (talkcontribs)

the file is “/htdocs/extensions/intersection/DynamicPageList.hooks.php(513)”

Reply to "Extension:HitCounter in mediawiki 1.28.0 Database Error 1054"

Share your experience and feedback as a Wikimedian in this global survey

1
MediaWiki message delivery (talkcontribs)
  1. This survey is primarily meant to get feedback on the Wikimedia Foundation's current work, not long-term strategy.
  2. Legal stuff: No purchase necessary. Must be the age of majority to participate. Sponsored by the Wikimedia Foundation located at 149 New Montgomery, San Francisco, CA, USA, 94105. Ends January 31, 2017. Void where prohibited. Click here for contest rules.
Reply to "Share your experience and feedback as a Wikimedian in this global survey"
There are no older topics