FuelPHPでindex.phpを含むURI(mod rewriteで省略しない)場合、

paginationのリンク生成が正常に動作しないことを確認しました。

 

■例

http://localhost/app/public/index.php/aaa/bbb/list

■コントローラ: bbb

■メソッド:list

■paginationのconfig

$pagination = Pagination::forge(‘default’, array(
‘pagination_url’ => ‘/app/public/index.php/aaa/bbb/list’,
‘uri_segment’ => 4,
‘total_items’ => $count,
‘per_page’ => $this->per_page,
‘));

この場合、paginationで生成されるURLは、以下のようになりました。

http://localhost/app/public/index.php/aaa/bbb/2
※本来であれば、http://localhost/app/public/index.php/aaa/bbb/list/2となるはず

上記の例をmod rewriteでindex.phpを省略させた場合、正常に動作し、以下のURLが生成されました。

http://localhost/app/public/aaa/bbb/list/2

 

paginationのコードを追ったところ、以下の部分を変更することで正常に処理されるようになりました。

■FuelPHP 1.6の場合

543行目
○修正前

$segs[$this->config['uri_segment'] - 1 + $seg_offset] = '{page}'; 

○修正後

$segs[$this->config['uri_segment'] + $seg_offset] = '{page}'; 

 

この事象は恐らくバグだと思われます。
これはあくまで暫定の対処方法です。

 

9 Comments

  1. Darknet Link Verzeichnis says:

    … [Trackback]

    […] Here you can find 16381 additional Info to that Topic: dragon-ark.com/archives/680 […]

  2. Acnetin says:

    … [Trackback]

    […] Here you will find 13823 more Information to that Topic: dragon-ark.com/archives/680 […]

  3. 토토사이트 says:

    … [Trackback]

    […] Info to that Topic: dragon-ark.com/archives/680 […]

  4. microsoft exchange cloud says:

    … [Trackback]

    […] Read More to that Topic: dragon-ark.com/archives/680 […]

  5. adsl teknik servis says:

    … [Trackback]

    […] Read More here to that Topic: dragon-ark.com/archives/680 […]

  6. bilişim danışmanlık firmaları says:

    … [Trackback]

    […] Information to that Topic: dragon-ark.com/archives/680 […]

  7. kurumsal bilişim danışmanlığı says:

    … [Trackback]

    […] Here you can find 73714 more Information to that Topic: dragon-ark.com/archives/680 […]

  8. Sveriges pass says:

    … [Trackback]

    […] Read More to that Topic: dragon-ark.com/archives/680 […]

  9. บาคาร่าออนไลน์ says:

    … [Trackback]

    […] Information on that Topic: dragon-ark.com/archives/680 […]

Leave a Reply