Skip to content

Wrong links for pager #2016

Description

@penguinpower80

When CI is running from a subdirectory, the pager links are incorrect and missing the subdirector(ies) in URI.

CodeIgniter 4 version
4.0.0-beta.2

Affected module(s)
PAGER

Expected behavior, and steps to reproduce if appropriate
Base url: http://mysite.com
CI in subfolder "ci/v4", so final url for site is "http://mysite.com/ci/v4/"

In view, calling "$pager->links()", using all other default settings, pagination links are:

  • 2
  • and should be:

  • 2
  • In my app.php AND .env file, I have app.baseURL set to "http://mysite.com/ci/v4/

    If I run $page->setPath( 'ci/v4//' ) prior to output, then it is correct. but it hardcodes the uri which isn't desirable.

    Context

    • Mac OSX 10.12.6
    • Apache 2.4.29
    • PHP 7.2.17

    Activity

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      No labels
      No labels

      Type

      No type

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions