Support » Plugin: Pods - Custom Content Types and Fields » 404 on Pod Page

  • Resolved netomarchiori

    (@netomarchiori)


    Hello there, I was able to create a page /items/ and by using a shortcode list all pod items in it.

    Now I’m trying to create a Pod Page “items/*” to list only 1 item from my pod, but keep getting 404 pages when trying to access items/<pod slug>

    “Item” is an Advanced Content Type btw.

    Pod is the only plugin turned on in my site. Currently using “twenty twenty” theme.

    Any ideas?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hello @netomarchiori

    Please give is more info about your setup, could you share your configuration so we can try to reproduce?

    Cheers, Jory

    Thread Starter netomarchiori

    (@netomarchiori)

    Hello Jory, sure!

    “Stock” is a Advanced Content Type that has the default fields plus:
    -User (a relationship field)
    -Weight (a pure number field with 2 decimals)

    Then I have a Pod Page:
    -“Stock Detail”, associated with Pod “Stock”
    -With “Wildcard Slug” set to “stock/*”

    whenever I go to stock/my-product-slug, the page should at least show, right?

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @netomarchiori

    Your Pod Page is configured incorrectly.

    The Pod Page Name should be your Wildcard value: stock/*
    And your wildcard should consider the URL permalinks: {@url.1}.

    Also, see this doc page for more info: https://docs.pods.io/tutorials/using-pods-pages-with-advanced-content-types/
    (It’s an old page so we’ll need to update it with more examples)

    Cheers, Jory

    Thread Starter netomarchiori

    (@netomarchiori)

    it worked!! sort of…

    whenever I try to add PHP code to Pod Page “Page Code” or “Page Pre Code” and hit save, I get a 500, something related to mod_security.

    Anyway, I ended getting it to work, all is left is to work on some permission issues now. Thanks!

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @netomarchiori

    Great!
    And the security issues might be related to the use of PHP code. PHP code should only be used where it’s meant to be used: .php templates.
    For the page code you can use your magic tags which are a simplified form of variables in which you can even use function calls:
    https://docs.pods.io/displaying-pods/magic-tags/

    Cheers, Jory

    Thread Starter netomarchiori

    (@netomarchiori)

    yes, mod_security was not allowing me to add PHP code to Pod Pages, i’ve ended up creating a custom template for it.

    Thanks for all your help Jory!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘404 on Pod Page’ is closed to new replies.