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}'; 

 

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

 

17 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 […]

  10. dumps store says:

    … [Trackback]

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

  11. kahr p380 for sale says:

    … [Trackback]

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

  12. anti screenshot blocker says:

    … [Trackback]

    […] Find More Info here on that Topic: dragon-ark.com/archives/680 […]

  13. fake handbag says:

    fake handbag

    blog topic

  14. Bergara Rifles For Sale says:

    … [Trackback]

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

  15. adidas samba says:

    adidas samba

    400 The plain HTTP request was sent to HTTPS port

  16. buy marijuana online says:

    … [Trackback]

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

  17. cheap jordan shoes says:

    cheap jordan shoes

    blog topic

Leave a Reply