Tagged: x
-
AuthorPosts
-
November 4, 2016 at 6:51 am #1243625
MiquelAdellParticipantHi, please let me first state some things about my project:
I have a child theme of X called “jipi”.
I have created a custom post type called “past”. I plan on having single plage custom template and archive custom template for said post type.Single page tempalte works perfectly. I have ‘single-past.php’ on the root of my child theme and it gets called on:
http://staging.jipi.cat/en/past/2016/But the file ‘archive-past.php’ does not get called on http://staging.jipi.cat/en/past
Instead I got the following error:Notice: Undefined index: args in /home/jipi/staging.jipi.cat/wp-includes/functions.php on line 4961 Warning: include(/home/jipi/staging.jipi.cat/wp-content/themes/jipi/index.php): failed to open stream: No such file or directory in /home/jipi/staging.jipi.cat/wp-includes/template-loader.php on line 75 Notice: Undefined index: args in /home/jipi/staging.jipi.cat/wp-includes/functions.php on line 4961 Warning: include(): Failed opening '/home/jipi/staging.jipi.cat/wp-content/themes/jipi/index.php' for inclusion (include_path='.:/opt/cpanel/ea-php55/root/usr/share/pear') in /home/jipi/staging.jipi.cat/wp-includes/template-loader.php on line 75There seems to be happening 2 things here.
It does not find any custom template for the archive page so it goes all the way to request ‘index.php’ but it’s looking for said index.php on the path of the child theme and as I not have a copy of X index.php there it fails.That’s puzzling me because I’ve both followed the WordPress guide to custom post types and also checked this post with instructions specific for X and I don’t see anything wrong… in fact single-past.php works.
Is there something that I’m missing?
Thanks!
November 4, 2016 at 8:08 am #1243691
Rue NelModeratorHello There,
Thanks for writing in! Would you mind providing us the url of your site with login credentials so we can take a closer look and fix the issue? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP Hostname
– FTP Username
– FTP PasswordDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thank you.
November 4, 2016 at 8:57 am #1243748
MiquelAdellParticipantThis reply has been marked as private.November 4, 2016 at 10:40 am #1243886
MiquelAdellParticipantIt’s related to WPML. Disabling this plugin makes everything “work”.
I’ll look to that plugin instead then.
Thanks!
November 4, 2016 at 10:42 am #1243895
RahulModeratorGlad you’ve sorted it out for yourself!
If you have anything further to ask, kindly let us know. We’d be happy to assist you with anything.
Thank you.
November 4, 2016 at 11:54 am #1243999
MiquelAdellParticipantI was to quick to dismiss this issue.
It seems to be a issue with *both* X and WPML.
If I disable WPML X works as intended.
But if I use a child theme of twentysixteen with just the CPT the archive works correctly.I’ve created just this test and staging.jipi.cat/en/past displays “archive-past” which is the correct optput.
If I switch to the X child I get the error from the first post.
If I switch to the X child *and* disable WPML it works.
As I’ve seen X work with WPML with X I suspect there is something more to it.
Could you please give it a look?
November 4, 2016 at 7:44 pm #1244488
Rue NelModeratorHello There,
This is not the issue between X and WPML. This is because of the way you have created the custom post type template. To fully understand how it should be done, please follow a detailed instruction from this topic: https://community.theme.co/forums/topic/need-advice-on-custom-post-type-template/#post-616094
For reference topic, you may check these topics as well: https://community.theme.co/forums/topic/custom-post-type-template-2/, https://community.theme.co/forums/topic/custom-post-type-templates/
Hope this helps.
November 7, 2016 at 2:56 am #1246727
MiquelAdellParticipantHello,
Thanks for your help.
I’ve read the 3 linked posts and I’m not getting it to work. Either there is something different on my configuration or I am not understanding something.
I’ve created some test files and uploaded them to the test server.
My file structure is as follows (paths relative to the child theme folder):
./index.php
Is a copy of x/index.php
single-past.php
contains:<?php x_get_view( x_get_stack(), 'wp', 'single-past' ); ?>archive-past.php
contains:<?php x_get_view( x_get_stack(), 'wp', 'archive-past' ); ?>So from this point on I should be checking the files on
./framework/views/icon/There I have:
./framework/views/icon/wp-index.php
a copy of the same file from the X theme folder../framework/views/icon/wp-single-past.php
A copy and rename of wp-index.php./framework/views/icon/wp-archive-past.php
A copy and rename of wp-index.phpFor single-past URLs everything works.
The files are called as:./single-past.php ./framework/views/icon/wp-single-past.phpBut for archive-past URLs I get the following stack of calls:
./framework/views/icon/wp-index.phpInstead of
./framework/views/icon/wp-archive-past.phpYou can check all that by going to the following urls:
http://staging.jipi.cat/en/past/?test
and
http://staging.jipi.cat/en/past/2016/?testI’ve made all the files referenced on this reply print their file names if ?test is passed.
(you can remove test to see the normal output)It seems to me that, for some reason, ./archive-past.php, is not being recognized as the template for the archive of past CPT.
November 7, 2016 at 3:12 am #1246744
Paul RModeratorHi,
I would like to check, but the ftp login you provided no longer works.
Do you mind activating it again so we can check.
Thanks
November 7, 2016 at 4:12 am #1246818
MiquelAdellParticipantThis reply has been marked as private.November 7, 2016 at 6:07 am #1246949
RadModeratorThis reply has been marked as private.November 7, 2016 at 7:54 am #1247062
MiquelAdellParticipantThis reply has been marked as private.November 7, 2016 at 2:33 pm #1247635
JadeModeratorHi there,
I tried to login through the details you have provided but it still doesn’t seem to work.
Kindly double check and make sure that the IP restriction is temporarily disabled.
Thank you.
November 8, 2016 at 2:50 am #1248360
MiquelAdellParticipantI’m checking with my hosting provider. I’ll come back to you. Sorry about the delay.
November 8, 2016 at 3:20 am #1248388
ChristopherModeratorLet us know how it goes.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1243625 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
