Bug with truncatewords and truncate in blogs...

I have noticed a problem with the help of truncatewords or truncate in blogs. (It can happen elsewhere, just have not seen).

To replicate the issue, let me share a bit of code.

First of all, in the overall design, I have code that looks like this:

< div class = 'row content-margin' >

< div class = "medium-8 small-12 columns" >

< div class = "content-container" >

{tag_postlist}

< p > {tag_previouspage} {tag_pagination} {tag_nextpage} < /p >

< / div >

< / div >

< div class = "way-4 small-12 columns" >

{module_contentholder name = "sidebar"}

< / div >

< / div >

Of course, this brings in the layout of the post and it must have a primary column and a sidebar. Then, in the list of Post layout, I have the following code:

< h2 > {{title}} < / h2 >

{{body | truncatewords: 100, '...}} »}}

< br class = 'clear' >

< a href = "{{url}}" class = "button brand" > Read Post < /a >

Then let's say that I have the following code in a blog:

< ul class = "non-balle" >

" < li > < a href =" http://www.example.com "> example of title < /a > < /li > .

Additional information about the link above < /li > < li >

" < li > < a href =" http://www.example.com "> example of title < /a > < /li > .

Additional information about the link above < /li > < li >

" < li > < a href =" http://www.example.com "> example of title < /a > < /li > .

Additional information about the link above < /li > < li >

<!--< li > > other items

< /ul >

That should give me a nice snippet from the list in the blog post, but it does not work.

It gives me a nice snippet, but also it messes up the code on my page.

Like this, it should BE rendered on the page:

< div class = 'row content-margin' >

< div class = "medium-8 small-12 columns" >

< div class = "content-container" >

Blog Post 1 < h2 > < / h2 >

< ul class = "non-balle" >

First < /li > < li > li element

Second point < /li > < li > li

Third point li < li > < /li >

< /li > < li > limited to the first 100... Etc. Word

< /ul >

< br class = 'clear' >

< a href = "" / post-url "class ="button brand"> Read Post < /a >"

The 2 posts Blog < h2 > < / h2 >

< ul class = "non-balle" >

First < /li > < li > li element

Second point < /li > < li > li

Third point li < li > < /li >

< /li > < li > limited to the first 100... Etc. Word

< /ul >

< br class = 'clear' >

< a href = "" / post-url "class ="button brand"> Read Post < /a >"

<! - additional Blog post - >

< p > < a href = "#" > 1 < /a >, < a href = "#" > 2 < /a >, < a href = "#" > 3 < /a >, etc. < /p >

< / div >

< / div >

< div class = "way-4 small-12 columns" >

<! - the content of my Sidebar - >

< / div >

< / div >

But it doesn't work. Instead, he makes like this:

< div class = 'row content-margin' >

< div class = "medium-8 small-12 columns" >

< div class = "content-container" >

Blog Post 1 < h2 > < / h2 >

< ul class = "non-balle" >

First < /li > < li > li element

Second point < /li > < li > li

Third point li < li > < /li >

< li > Etc. Word that is limited to the first 100...

< br class = 'clear' >

< a href = "" / post-url "class ="button brand"> Read Post < /a >"

The 2 posts Blog < h2 > < / h2 >

< ul class = "non-balle" >

First < /li > < li > li element

Second point < /li > < li > li

Third point li < li > < /li >

< li > Etc. Word that is limited to the first 100...

< br class = 'clear' >

< a href = "" / post-url "class ="button brand"> Read Post < /a >"

<! - additional Blog post - >

< p > < a href = "#" > 1 < /a >, < a href = "#" > 2 < /a >, < a href = "#" > 3 < /a >, etc. < /p >

< div class = "way-4 small-12 columns" >

<! - the content of my Sidebar - >

< / div >

<!-Additional LI or DIV tags for each subsequent blog post. ->

< /li > <!-LAST LI TAG FOR BLOG POST 2! ->

< /ul >

< /li > <!-LAST LI TAG FOR BLOG POST 1. ->

< /ul >

< / div >

< / div >

< / div >

I know this may be hard to visualize because these forums are not the best at the position code. But basically the last li and ul tag encapsulates everything breaking the layout of the page. This happens when I use both {{body | truncatewords: 100, '...}} "} OR {{body |}} TRUNCATE: 100 «...» »}}.

If I just use {{body}} it works fine, but it is not desirable that this post is really long. Also, I can use {tag_blogpostbody, 50, [...]}, but this makes my list just as a block of text without any set and all the links are in the citations which is horrible.

The site is still under development so I'm not post a URL but I will happily the PM all BC personal link.

Does anyone found a workaround for this?

You will have to strip_html when using truncate or truncate_words ; they work only on channels and are not aware of the html syntax. They do not close tags that have been opened in their result.

If you need to keep the html tags in the code snippet, you will probably have to make the whole of the body and hide the rest with css such as overflow: hidden; .

Tags: Business Catalyst

Similar Questions

  • MY POP3 accounts receive emails with lack and truncated attached files. This started only after the most recent update for Thunderbird Version 38.1.0

    I recently started having truncated the attachments in the emails to my POP3 accounts. The first I noticed was on 27 July 2015.
    I'm running Thunderbird Version 38.1.0 on Windows on Windows 7 Home Premium service pack 1. After the test, I found that this happens on all POP3 accounts only. IMAP accounts do not work properly.
    A single file is usually truncated, if I send several files to get a complete file one truncated and more sent are missing completely.

    I wanted to send a bug report, but your system is unusable because it asks us to load the daily accumulation and essay on a new account, but the link to the daily version is going nowhere. But it's ok

    Thank you

    Thanks Matt.
    I had no luck by disabling addons, and I found that I'm unable to start in SafeMode (another problem to solve), but in research and the elimination of other culprits (malware) this problem stopped.

  • Y at - it shows a bug with Hide and regions in 4.1.1.00.23?

    Hi all

    I tried to put a subregion Hide and Show area on a page. It is supposed to have a subregion of the form of each side (i.e. above and below).

    'View' of the region will show a "View only" control with a text and a picture inside.

    When I create the subregion Hide and Show area and add the control. everything seems to work as expected. However, when I then moves the subregion so that it is now between the subregions two form, 'view' is no longer something watch. The arrow changes, but that's all. It's as if the display control had ceased to exist. Move that the subregion any where from there does not change the behavior - show it only control is not displayed.

    Does anyone know if this is a known issue with 4.1.00.23? If so, is there a workaround?

    Thank you very much

    PT

    There seems not to be a bug and it seems not be a workaround.

    To recreate (at least in version 4.1.1), in the tree, create two subregions of form and add some controls. Create a subregion Hide and Show, and then add a control. If you run the page now, it should appear normal (i.e. the content in the skin and see the subregion will be visible when you click on show). Now, move the sub-region Hide and Show via drag and drop to between the two sub-regions form. If you run the page now, it should appear that there is no content in the skin and see the sub-region, despite the fact that, in the design view control is always there.

    See the bug itself, swap component mode. You will notice that even if the sequence of sub region numbers appear correct, the physical order of the sub regions will always be as they were when the subregion to hide and see the creation.

    Thus, it will look something like this:

    Shape 90 1 sub-region

    Subregion 230 form 2

    100 hide / display the subregion<-- in="" tree="" view,="" this="" will="" appear="" to="" be="" between="" form="" sub="" region="" 1="" and="" 2,="" in="" component="" view,="" it="" still="" appears="" at="" the="">

    To fix, go back to tree, drag hide and show of the subregion at the bottom, return to the view of the component, change hide and show of the subregion it and manually change the value of the sequence to a value between Sub regions 1 and 2 form. This will be:

    • go hide and show the sub-region to form Sub region 1 region 2 Sub form
    • the content of the Hide and Show under region now appears when you click to perform the operation to see the

    Hope this helps someone someday.

    PT

  • Very strange bug with AIR and native process (Windows 7, EXE)

    Hi all!

    The situation is:

    I did an Application AIR, inside which a native process - running EXE file.

    I use Flash CC as IDE and tried to use the compilation as EXE with AIR 2.6 and 3.6 - results are the same.

    So I insert inside a control if the nativeprocess is supported or not and the native process is supported all the time.

    When I come to install the application and run it - the first attempt is good - everything works as a must: internal EXE is called by my Application with the necessary parameters so long I need.

    However if I close the application, then if it run not new - internal EXE is not starting at all, depends on number of attempts to restart the application.

    Then only is to uninstall, install back and then you'll be a session more successful EXE-internal requests, until the forthcoming resumption of the application.

    That's all.

    I tried to "google it" but without success. The bug is probably very rare.

    Help me please?

    Update: compiling with the Flash IDE of CC, he works all the time with no problems.

    Update-2: when I run EXE installator, there will be a notification "same version is installed, etc.', then choose 'Run Now' - he also works without any problem.

    Well, I found the solution and the answer by myself and it is here please:

    In the case with the same situation above, you will need to add a single line in your AS3 code

    nativeProcessStartupInfo.workingDirectory = File.applicationDirectory;

    And you will be so happy

  • There is a bug with GarageBand and download on soundcloud

    I wanted to download a song on soundcloud, so I named it the flamethrower. I put a cover photo and set it to the public. And assign the average quality. But this error screen appeared. I put it the same thing this time, but as an uncompressed file. AIFF.

    She is still the same please help or at least tell what happened to you too (important note: I am in Korea, not America.)

    Welcome X8_minithug_8X,

    Thank you for your first post on Apple Support communities.  I'd like to help you with the download of your Garageband creations SoundCloud.  I found all kinds of great artists there, so I know it's important, that you can get your downloaded music.

    The below-referenced article has instructions on how to download on SoundCloud.

    Send a song from GarageBand to SoundCloud

    You mentioned being in Korea would affect your ability to access to SoundCloud or feature.  It may be possible that this feature is not available in your area.

    Best wishes

  • PhongMaterial.setMaterial "bug" with MeshView and multiple TriangleMesh

    Basically, I create a group of TriangleMesh using 1 mesh, creating a new instance of the view every time and just defining the coordinates to create a group that has batteries high, wide and deep.

    In the code I originally wanted to do
    (if w % 2 ==0) 
    {
    p.setDiffuseColor(Color.RED)
    }
    {
    else
    {
    //blue
    }
    As a result, displaying only the second color in this case, or the first color if w %2! = 0, which was weird.


    Then, I entered this next issue to attempt to define the scale and the high.
     protected final void populate()
                    {
                        for(int w = 0; w < wide; w++)
                        {
                           MeshView meshV = new MeshView(this.mesh);
    
                               p.setDiffuseColor(Color.AQUA);
                            
                          
                            meshV.setMaterial(p);
                            
                             super.getChildren().add(meshV);
                             
                        }
    
                        for(int h = 0; h < high; h++)
                        {
                           MeshView meshV = new MeshView(this.mesh);
                          
    
                               p.setDiffuseColor(Color.ANTIQUEWHITE);
                       
                            meshV.setMaterial(p);
     super.getChildren().add(meshV);
    
                    }
    So, try to affect the material in both loops I get all the s MeshV be ANTIQUEWHITE. If I get rid of the second setMaterial I'll have the first ANTIQUEWHITE set and the second gray. each other in the first results being grey and the second ANTIQUEWHITE.


    Now it seems to me that if he does everything with just this 1 setMaterial, but I don't know why if I create a new instance each time. If it was the MeshV even, perhaps, but in this case, it's weird... I have no real use for the handling of the MeshView later, I just need to create the mesh and then aside, their distance with the code for that is not stated above.

    According to this Web page 'features 3D' https://wikis.oracle.com/display/OpenJDK/3D+Features | https://wikis.Oracle.com/display/OpenJDK/3D+features]:

    -javafx.scene.shape.Mesh: sharable between several forms defined by the user
    -javafx.scene.paint.Material: sharable between several Shape3D nodes

    In your code you re-use the mesh instance (TriangleMesh) and the instance of p (PhongMaterial). These instances are not copied, they are referenced. Any change requested to 'mesh' and 'p' will affect ALL users (MeshView).

    Creation and re-use of two PhongMaterial, pAqua, and pAntiquewhite objects, should lead to the Visual effect desired.

    August

  • Bug with interval and leap years

    select to_date('2012-feb-29','yyyy-mon-dd') + interval '1' year as dt from dual;
    
    ORA-01839: date not valid for month specified
    01839. 00000 -  "date not valid for month specified"
    *Cause:    
    *Action:
    
    select to_date('2012-feb-29','yyyy-mon-dd') + interval '2' year as dt from dual;
    
    ORA-01839: date not valid for month specified
    01839. 00000 -  "date not valid for month specified"
    *Cause:    
    *Action:
    
    select to_date('2012-feb-29','yyyy-mon-dd') + interval '3' year as dt from dual;
    
    ORA-01839: date not valid for month specified
    01839. 00000 -  "date not valid for month specified"
    *Cause:    
    *Action:
    
    select to_date('2012-feb-29','yyyy-mon-dd') + interval '4' year as dt from dual;
    
    29-FEB-16 00:00:00
    
    
    select to_date('2012-feb-29','yyyy-mon-dd') + interval '1' day as dt from dual;
    
    01-MAR-12 00:00:00
    
    select to_date('2012-feb-29','yyyy-mon-dd') + interval '1' month as dt from dual;
    
    29-MAR-12 00:00:00
    The problem exists in 10.2.0.4 and 11.2.0.3

    Published by: birlenbach-Chase February 29, 2012 09:20

    Hello

    That's just how the intervals of work. Leap years are the least of the problem; Adding 1 month to 31 March results in the same error.
    If you want to make sure that the result is a valid DATE, use ADD_MONTHS. (There is no separate function for adding years; use ADD_MONTH (SYSDATE, 12 * n) to get the DATE which is n years.)

  • I download the demo version of Lightroom CC for Mac and it bugs with DW021 error code. What should I do?

    I download the demo version of Lightroom CC for Mac and it bugs with DW021 error code. What should I do?

    Hello

    Please visit:-Error 21 or DW021 when installing Photoshop CC 2015

    or

    I need help!

  • Replacement of a Wordpress site with a site of Muse and maintaining the blog

    Hello

    I remodel a site for a friend. The site was built in Wordpress. He agreed to make the change as long as he can maintain his active Wordpress blog. His site is hosted in a top level domain, let's call it www.buddy'ssite.com.

    I try initially to use the RSS feed Widget options in the Muse 2015 update Wordpress blog posts into the new built face web site.

    How do I replace the Wordpress site with the site of Muse in the same field and keep the blog active?

    I think I need to transfer the Wordpress site on a subdomain so that I can then download the site of Muse to the main domain.  at this stage I guess the hosting platform will CPanel.

    I hope that if this goal is achievable my boyfriend will be able to go on his blog in Wordpress (in a subdomain like www.blog.buddy'ssite.com) which are introduced in the new site of Muse (www.buddy'site.com)

    Any advice on how to make, or the best way to do this would be greatly appreciated.

    CY

    My site is a WP.com paid as well, but I thought that once I've migrated all content and then DNS'ed the field besides it would go back to the free version or it would disappear, and then I just take the blog separately and load it back. I know that sounds like a lot, but the way I thought. Let me know what you decide please! I am open to all suggestions.

  • Bug with rendering property on IE and FF

    Hello
    I have a bug with the property made on jdev 11g 11.1.1.1.0
    In a managed bean, I create a method starting with 'get' as getchPasswordRendered
    This method returns a Boolean value.
        System.out.println("getChPasswordRendered -> " + bindings.get("ChPassword").toString().length());
        if (bindings.get("ChPassword").toString().length() != 32) 
        {
          System.out.println("getChPasswordRendered -> TRUE");
          return Boolean.TRUE;
        }
        else 
        {
          System.out.println("getChPasswordRendered -> FALSE");
          return Boolean.FALSE;
        }
    I call this method in ChPassword inputText property rendered like this:
    #{managedBeanName.chPasswordRendered}

    It's my Structure.

    When I run the page:
    The first line of the display: table is selected, length = 5, the input text "ChPassword" to af: panelFormLayout is visible (getchPasswordRendered return true-> ok)
    I select the second line, length = 6, the input text is visible (getchPasswordRendered return true-> ok)
    Then I select the third row, length = 32, text entry is not visible (false return getchPasswordRendered-> ok)
    Finally, I select the second line, length = 6 and text entry is NOT visible (getchPasswordRendered return true-> bug!)

    Can you tell me why?
    Thanks for your help.

    Try the visible attribute instead of the rendering and see if it works.
    If Yes, it's probably only so rendered because is set to false, the component is removed from the page and you don't get back until the next full page reload.

    Timo

  • I have a bug with the icons. all the icon open by paint, internet Explorer etc. And I can't start them. So please help me if it is wrong hospitales send you a picture

    http://S1150.Photobucket.com/albums/o606/Valyo95/?action=view¤t=c385264a.PNG---qui is an image.
    This happens when I tried to open a file and I open it with Notepad and then everythink vhanges like that. I tried different programs, but nothink happens.

    http://S1150.Photobucket.com/albums/o606/Valyo95/?action=view¤t=c385264a.PNG---qui is an image.
    This happens when I tried to open a file and I open it with Notepad and then everythink vhanges like that. I tried different programs, but nothink happens.

    Use this tutorial:

    Restore the default file type associations

    http://www.SevenForums.com/tutorials/19449-default-file-type-associations-restore.html

    Scroll down to exe - executable application files.
    Click on the exe

    Follow the instructions from #1 to #6 in the upper part.

    Scroll to lnk - shortcut link (LNK) files.
    Click on lnk

    Follow the instructions from #1 to #6 in the upper part.

  • try to create several boxes to click with images and audio comments

    I'm not too familiar with captivate and would like to possibly ready to provide guidance.

    I am creating a screen in a course which is a graph (jpeg) and in the graph, there is 4 areas that are false.  I want to learners to find out all the four questions by clicking on each of them.  When they click on each of them, will receive an image with textual comments (jpeg) and they will also hear a short audio clip.  When the audio is finished, the image should disappear, the learner can then on other possible issues that will work the same way.  There is no notation, there is no restriction to find each number in a specific order, etc.

    I tried to create boxes to click for this, but it does not work... the project never stops for the learner to click on the graph, it just continues and played audio until the learner clicks on anything whatsoever... and never displays text comments (jpeg).

    Thanks in advance for any help.  HaPpY Friday!

    Captivate 4: export outside in a swf file.

    Hi again

    mon_mac wrote:

    Thank you for the reply rick.

    You're more than welcome!

    mon_mac wrote:

    Yes, I want the project to have a break.  for some reason he has not paused.  If you look at the timeline, my audio blade plays to set up the interaction, then when it gets to the click box he just continues to play with no break and plays the audio that I attributed to him.  It is not disply my image of feedback however.

    This makes me wonder how you preview. If you say that you use the type 'Play this slide' preview, that's why. This type of preview is more to simply observe rough (and I don't want to fuck in every sense of the term) calendar. Interactive elements such as click boxes, buttons, and text entry boxes do not work in this type of preview. That's why you see not all comments. (If this is the type of preview you used)

    mon_mac wrote:

    Yes, I am trying to use an image for the comments, not a caption box.  can I do this?

    Well, Yes and no. In that sense, Yes, you could configure things so that a click simply allows the playback head visit another slide or whatever. And on the slide that you visit, you have an image, the user sees. Who could act as your comments. You can also configure the click box with a legend of success or failure to the feedback. They click on the click box or the outer and trigger the legend must be revealed. You can use an image of your choice for the legend. And must not contain text.

    Before going further, let's see if everything what I offered this day helps your question.

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

  • Bug with the donation page today

    You have a bug with your fundraising page. I have selected $10 and transferred to Paypal to $3. I tried again and made sure to click twice on a $10. I got the same results. I thought you should know.

    Hi el_nik,
    I filed a bug to prosecute for the page to donate. However can you please confirm that this always happens after that you remove the cookies from the page?

  • Since the installation of Mac Mavericks all my friends with Macs and I have problems with the cursor disappears, that in Firefox, Safari is very good...

    I stopped using Firefox as nothing I've done has corrected this problem. I tried to close Firefox and restart it, I erased all my Add-ons and then added adblock back (it's the only one), but it still does not work. I deleted files so that I have more space - I can't think of anything that works. I talked to four of my friends with Macs and they are all having the same problem with Firefox since the Mavericks.

    Cursor disappears huh? It's quite strange. All of the compatibility of the Mavericks can be followed in [Bug 883824]

    Try this work around:

    1. Go to Firefox > Preferences > advanced > general
    2. Always check "use the cursor keys to navigate through the pages.
    3. Press OK.

    Or try the Mac preferences noted here: https://discussions.apple.com/message/23542890#24471966

  • While I was with Firefox, Google stole my blog! I used like Firefox

    It is about 2 months since Google has stolen my blogs (copywrited). I had decided to close a small gmail account that I had problems with it and among them Google hacked into and changed the user name and password. Needless to say, I was devastated - 10 years ' worth of intellectual property inaccessible! The funny part is that people comment on my blog and Blogger them sending me to the moderation and I can't moderate. They won't let me even to visit the blogs of my Blogger friends.

    Hi Kay, you've posted on the support forum of Blogger on how to regain control of your blog?

    https://productforums.Google.com/Forum/#! Forum/blogger

    I don't think that there is much we can do here to help with that.

    If you are unsure about the safety of your browser, consider if you have suspicious modules or malware on your computer. We address these issues more in detail if you wish.

Maybe you are looking for

  • Re Apple Os &amp; authentication

    I did dial using samples of software and music on a PC.  I had always taken full disk image of my entire system backups so that if something goes wrong, I could simply restore the image and proceed as if nothing had ever happened.  For most of the pr

  • error 7 GPIB / NOR-488

    Ladies and gentlemen, I am trying to contact a Keithley SMU 236 on Labview 2009 running on Windows XP. Write orders by VISA works very well, but written with functions GPIB does not work. I got following error messages: 7 Fehler ist bei GPIB: Schreib

  • should there be a network card is in the Device Manager list in windows vista

    Im having problems with my router belkin, wireless light is not on there is a driver of NIC installed on my computer to make this work im on windows vista

  • EGPU with x230T

    I read messages to make the eGPU for my Tablet Thinkpad X 230. Recently, I decided to buy this graphics card: Shapphire Randeon HD 7950. (100352 - 2L Radeon HD 7950 SAPPHIRE / GB 3, 384 - bit GDDR5 PCI Express 3.0 x 16) Is this a good buy for my eGPU

  • Taskbar to guard endangered and cant get it back with/without restart!

    My taskbar to guard disappearing randomly and don't won't come until I restart.  Once I restart the taskbar comes back and then disappears again. I looked at other solutions of people with similar problems and solutions do not work.