Jump to content


Photo
- - - - -

Plugin Types incompatibility with Framework

types post_type plugin

Best Answer gyoery , 31 July 2013 - 06:04 PM

never mind. I fixed that issue by hacking the core files. About talking to AP, well, it's not talking if he doesn't reply. I asked in the PL group on skype aswell. Also.. pagelines itsself is using CPTs so this might even be an internal bug, except that the PL CPTs are not queriable so luckily the core is not broken. But then again, nick, who made the pockets premium section, should be quite annoyed to find out that his plugin is not properly queriable cause it throws you on the wrong template. So while I understand this might not seem like a bug for the "out of the box" site PL provides, but it limits extendability for devs, so I look at it as a bug.

If anyone has the same issue, he can fix this by editing the pagelines/includes/class.template.php file.

!!!THIS IS NOT RECOMMENDED!!! and should only be done if you know what you are doing:
On line 106, 107 move the

         elseif( pl_is_cpt() )
            $type = get_post_type();

down by 4 rows under

         elseif(is_search() && VPRO)
            $type = 'search';
This will check first if you are on a search page, and only if not check if it is a custom post type.
This fix will most probably not stick if you update your core theme files, but this is the best I could come up with.

Again: THIS IS NOT RECOMMENDED
(and will hopefully be fixed in a future update) Go to the full post


  • Please log in to reply
5 replies to this topic

#1 gyoery

gyoery

    Advocate

  • Members

  • 252 posts
  • Country: Country Flag

Posted 30 July 2013 - 03:17 PM

Hi,

I am expiriencing problems when using the types plugin

(

Please Login or Register to see this Hidden Content

)
Issue:
When creating a CPT (in my case called videos) and then using the wordpress search, depending on your search term the Wordpress page template varies: You either get the search template or the single CPT template.

If the results contain CPTs it will return the Video Page Template. This should not be. I want the search results to always return on the Search template.

I already started a thread with the plugin creator here:

Please Login or Register to see this Hidden Content

 

Here are two different queries which return different templates:

Please Login or Register to see this Hidden Content


Please Login or Register to see this Hidden Content

 

WP version: 3.5.2
PL Version: 2.43
Types version: 1.3.1

Could really use some help on this one ;)



#2 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 30 July 2013 - 08:06 PM

Hi,

 

I'm not even sure how to answer you on this one. It seems this is more a case of what your plugin does with the WP query, and what that query returns.  It sounds like you need some customization of WordPress. 

 

I don't think (and I could be wrong) that PL Framework would deliver a template unless it is called.  So, based on that call, whatever it is, any theme, platform or framework would deliver the related template.  No?  I would imagine too, that you'd need some kind of specific filter to leave out the video template, and deliver only the search template. That's going to take a professional developer with experience more in your plugin, than with our product.

 

I'm sorry to be less than perfectly helpful here, but coding isn't my expertise.  You may have noticed our Pros section is currently closed, so I can't even refer you to anyone.



#3 gyoery

gyoery

    Advocate

  • Members

  • 252 posts
  • Country: Country Flag

Posted 31 July 2013 - 04:47 PM

Just found out, this is not a Types problem.

I added the post type with the following code:

Please Login or Register to see this Hidden Content

and removed types.. the issue still persists. If the result of the search is videos, then it shows the video template.

Praying to the PL Gods, AP, Simon, Nick, please help me out!!

#4 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 31 July 2013 - 05:34 PM

Hi,

 

First, I understand you're directing personal communications with AP, Simon and Nick. Do not do that.  It's inappropriate and isn't going to be helpful. This forum is where support is provided, when and where available. None of our team provide personalized support services.

 

If you've added that custom post type unfortunately we will not be able to support it.  You will need a developer. Clearly it's calling on pagelines to deliver something but it's not been specified to deliver what you expect.  I'd not know how you'd do that without a pro developer.  PageLines is not able to customize your post types unfortunately. 

 

This is a third-party code customization, which is solely the responsibility of the site admin or owner.  I'm sorry we can't be more helpful. 

 

However, you may wish to try a new site called www.pageliners.com which is offering some access to developers.  I don't know who, how or any other details and they are not part of the PageLines family of sites.

 

Very sorry that we can't help with this.



#5 gyoery

gyoery

    Advocate

  • Members

  • 252 posts
  • Country: Country Flag

Posted 31 July 2013 - 06:04 PM   Best Answer

never mind. I fixed that issue by hacking the core files. About talking to AP, well, it's not talking if he doesn't reply. I asked in the PL group on skype aswell. Also.. pagelines itsself is using CPTs so this might even be an internal bug, except that the PL CPTs are not queriable so luckily the core is not broken. But then again, nick, who made the pockets premium section, should be quite annoyed to find out that his plugin is not properly queriable cause it throws you on the wrong template. So while I understand this might not seem like a bug for the "out of the box" site PL provides, but it limits extendability for devs, so I look at it as a bug.

If anyone has the same issue, he can fix this by editing the pagelines/includes/class.template.php file.

!!!THIS IS NOT RECOMMENDED!!! and should only be done if you know what you are doing:
On line 106, 107 move the

Please Login or Register to see this Hidden Content

down by 4 rows under

Please Login or Register to see this Hidden Content

This will check first if you are on a search page, and only if not check if it is a custom post type.
This fix will most probably not stick if you update your core theme files, but this is the best I could come up with.

Again: THIS IS NOT RECOMMENDED
(and will hopefully be fixed in a future update)

#6 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 02 August 2013 - 05:19 PM

Thanks for pointing out that it's not recommended. 

 

It's also not supported. If you have problems with this, we will not provide support to your issue until you remove the coding provided by @

Please Login or Register to see this Hidden Content







Also tagged with one or more of these keywords: types, post_type, plugin