[wp-trac] [WordPress Trac] #32518: TwentyFifteen causes random redirects to archives/robots.txt when using CPT or page templates (was: Twenty Fifteen causes random redirects to archives/robots.txt when using CPT or page templates)
WordPress Trac
noreply at wordpress.org
Thu May 28 12:45:46 UTC 2015
#32518: TwentyFifteen causes random redirects to archives/robots.txt when using CPT
or page templates
--------------------------+-----------------------
Reporter: Jyria | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone:
Component: Themes | Version: 4.2.2
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+-----------------------
Changes (by Jyria):
* status: closed => reopened
* resolution: worksforme =>
* component: Bundled Theme => Themes
Comment:
Deactivation of plugins did not do anything to change the theme behaviour.
I deactivated the mod_pagespeed on my apache. Still no changes in theme
behaviour.
Then I played with my custom post type a bit more. This is what I did and
now it works.. I hope ;)
I corrected a typo in functions.php: capatibilitys.... lol. Then I decided
to register the CPT via Plugin rather than child theme functions.php. So I
wrote a small plugin to do the job.
I deleted the CPT registration function from theme functions.php
The weird behaviour stayed the same.
I then checked the templates once more.. I played around with file naming
according to WP Codex. No luck.
For example when trying to access a page with slug 'arbeiten' or also my
blogpage, it would redirect me to my CPT 'termine' archive. Or also to my
Page template 'shop'.
I finally renamed the CPT archive back to archive-termine.php In the
meantime while trying to find out what was wrong, I had named it
termine.php
Still no luck. Same weird behaviour.
In the end, I thought, ok.. if WP checks step by step the
page/post/archive templates and the decide to use cpt archive or my custom
page template, then the reason can only be, that it simply can not "see"
the page.php, archive.php etc in my parent theme folder.
So I copied the twentyfifteen page.php and archive.php to my childtheme as
well.
That did the trick.
Is that intended?
I think not, right? WP should check in parent themefolder as well as
childtheme to decide which template to choose, doesn't it?
So I believe there is something in wrong with twentyfifteen.
Also the behaviour was worst in firefox. In chrome/safari on my Mac I
could access the pages 85% without problems. I did get the behviour in
these browsers as well. However not as constantly as in firefox on my
windows machine.
Sorry for the long post
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32518#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list