heavenbr / wordpress-custom-content-type-manager

Automatically exported from code.google.com/p/wordpress-custom-content-type-manager
0 stars 0 forks source link

When I insert the code for summarizing posts, the following sentence becomes linkable too. #401

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
*SYSTEM INFO* 
------------------------ 
Plugin Version: 0.9.6-pl
WordPress Version: 3.3.1
PHP Version: 5.3.3
MySQL Version: 5.0.95
Server OS: Linux
------------------------ 
ACTIVE PLUGINS: 
 * Akismet v.2.5.6 [http://akismet.com/?return=true]
 * All in One SEO Pack v.1.6.14.6 [http://semperfiwebdesign.com]
 * Awesome Flickr Gallery v.3.3.5 [http://www.ronakg.com/projects/awesome-flickr-gallery-wordpress-plugin/]
 * Contact Form 7 v.3.2 [http://contactform7.com/]
 * Google Analytics for WordPress v.4.2.4 [http://yoast.com/wordpress/google-analytics/#utm_source=wordpress&utm_medium=plugin&utm_campaign=wpgaplugin&utm_content=v420]
 * RDFa Breadcrumb v.2.1 [http://wordpress.org/extends/plugins/rdfa-breadcrumb]
 * Sliding Youtube Gallery v.1.2.5 [http://blog.webeng.it/how-to/cms/wordpress/sliding-youtube-gallery-wordpress-plugin/]
 * Social Media Widget v.2.9.4 []
 * wp-jquery-lightbox v.1.3.4.2 [http://wordpress.org/extend/plugins/wp-jquery-lightbox/]
 * WP-PageNavi v.2.82 [http://wordpress.org/extend/plugins/wp-pagenavi/]
------------------------ 
CURRENT THEME: WordPress Theme 1350 v. 

What steps will reproduce the problem? (Be specific enough so that someone
else can make the plugin fail for themselves. Remember: if the issue can't
be fixed if it can't be reproduced!)
1. I'm inserting the code for summarizing posts, but each time I use a code, 
the following sentence becomes linkable too.

Here you can see it in action: http://www.siloscordoba.com/w/products/

Metal Structures, Livestock Services and Metal Structures are linkeable with 
the same URL that their respective last product of the previous list.

This is the code that the bottom "summarize posts" gives me: 
[summarize-posts post_type="portfolio" taxonomy="portfolio_category" 
taxonomy_term="silos" limit="10"]

What can I do? Thanks a lot for your help!
Maria Jose Lopez

Original issue reported on code.google.com by mjlopezr...@gmail.com on 26 Jul 2012 at 11:43

GoogleCodeExporter commented 8 years ago
Best to copy/paste the HTML or have screenshots of the issue : the page @ that 
URL might change, so it does not represent a good snapshot of the issue.  E.g. 
if you play around with it today and I look at it tomorrow, everything might 
have changed and I wouldn't be able to see the bug.

It looks like the bug is that the <a> tags are not being closed.  To fix:  
inside the includes/SummarizePosts.php file, line 34 should read like this:

const result_tpl = '<li><a href="[+permalink+]">[+post_title+]</a></li>';

That string was missing the closing anchor tag </a>

You can either edit the code in there or you can verbosely add the formatting 
string to your shortcodes, e.g. like this:

[summarize-posts post_type="portfolio" taxonomy="portfolio_category" 
taxonomy_term="silos" limit="10"]
<li><a href="[+permalink+]">[+post_title+]</a></li>
[/summarize-posts]

Hope that helps.

Original comment by ever...@fireproofsocks.com on 26 Jul 2012 at 2:02

GoogleCodeExporter commented 8 years ago
Hi! Thanks for your help. I included this code and now it works: <li><a 
href="[+permalink+]">[+post_title+]</a></li>[/summarize-posts]
But I thought the plugin would also insert the code for closing the tag 
automatically. I enclose the image of the green button I get on my visual 
dashboard when creating new pages (Imagen1.jpg) and the menu to make the post 
selection and get the code (Imagen2.jpg)
Is that buttom provided by the CCTM plugin or does it come with Wordpress? I 
think this button appeared when I installed the plugin.
Does it usually close the <a> tags? If yes, how can I fix it? Because inserting 
the code you provided manually is not a good long term option.
Thanks a lot for your help. Best regards, Maria Jose Lopez

Original comment by mjlopezr...@gmail.com on 27 Jul 2012 at 10:55

Attachments:

GoogleCodeExporter commented 8 years ago
Hi again,
I tried to fix it inside the includes/SummarizePosts.php file, but it reads 
like you say it should read:

const result_tpl = '<li><a href="[+permalink+]">[+post_title+]</a></li>';

I include a copy of the php file for you to verify.
Thanks a lot. 
Maria Jose Lopez

Original comment by mjlopezr...@gmail.com on 27 Jul 2012 at 11:29

Attachments:

GoogleCodeExporter commented 8 years ago
The file you attached does NOT include the closing </a> tag.  From line 31 in 
your file: 

const result_tpl = '<li><a href="[+permalink+]">[+post_title+]</li>';

Do you see?  It's missing the closing </a> tag, that's why you needed to fix 
it.  That's the whole reason there was a bug -- yes, I SHOULD have closed that 
tag, but I made a mistake.  Look closely at that line please.

The green Summarize Posts icon in your screenshot is from the CCTM plugin, not 
native to wordpress.

Original comment by ever...@fireproofsocks.com on 27 Jul 2012 at 1:57

GoogleCodeExporter commented 8 years ago
Hi! You are right, I looked closer and now I see there is a missing closing 
</a> tag. 
I fixed it on the php file and now it works fine. Thanks a lot for your 
patience, the plugin is great!
Have a nice week-end!

Original comment by mjlopezr...@gmail.com on 27 Jul 2012 at 2:38