Home / Forums / DynamiX Support / Problem with new excerpt engine with 2.8.9

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts

  • Semih Sevinc
    Participant

    Hello,

    after I've upgraded to 2.8.9 I found a small but annoying issue with the new excerpt engine. I'm using a plugin on our website, the AddThis button, for sharing posts and pages to a variety of social sites.

    I configured the AddThis plugin so that some share buttons are displayed below the actual page content.

    Everything is fine when displaying the post or page with 2.8.9, the content is correctly followed by the AddThis buttons.

    The problem appears when displaying archives, category views, etc. where excerpts are shown. The excerpts now contain the AddThis button, as if it was part of the page content (which it isn't, it is dynamically inserted when rendering the page). First, it looks awful, and second, it simply doesn't work. The AddThis buttons on the category page all refer to the category page they are displayed on, not to the post or page they came from.

    There could have been a way to solve this. AddThis offers some options, for example I can choose on which kind of pages the AddThis button should appear (page, post, category, archive). So my first idea was to unselect category and archive. But it turned out that these settings are not respected any more. It does not matter which option I select, but I know that these settings still worked in 2.8.8.

    I think excerpts should be created from the content of a particular post or page, excluding content that is dynamically inserted before or after.

    Can you give me some hint or even a solution for that issue?

    Any help is appreciated.

    kind regards,

    Semih

    P.S.: Sorry to bother you during easter. Happy Easter!

    Andy
    Andy
    Keymaster

    Happy Easter too Semih! 

    I'm assuming you have switched the option off in General Settings? (You will probably need to re-save even if switched to disable). 

    Let me know if you have or haven't because there are a couple of things which are not quite saving properly for one reason or another. 


    Semih Sevinc
    Participant

    Hello Andy,

    you mean the option "Excerpt shortcodes"? Yes, it is turned off. To be sure, I turned it on and off again, and saved several times afterwards.

    regards,

    Semih

    Andy
    Andy
    Keymaster

    Hi Semih,

    This is really frustrating – I can't reproduce the issue on the demo site. Can you provide your FTP details so I can test this?


    Semih Sevinc
    Participant

    Hi Andy,

    i'm a little clueless. Today I sat down to do some more extensive testing and found that the AddThis options are mysteriously working again. I don't know why, because I did nothing in the meantime.

    On the other hand this solves part of my problem on all the pages which use standard templates provided by your theme.

    The problem remains on a single page though, and what is special about that page is that it does not use any of your blog templates but it uses the [recent_posts] shortcode to display the news excerpts:


    [recent_posts content="textimage" categories="News" image_effect="shadowreflect" shadow="shadow-xsmall" image_width="50" image_height="50" image_align="alignleft" order="date" orderby="ASC" excerpt="50" limit="5" /]

    I hope you can reproduce the issue with this information.

    I'm sorry to have mislead you previously.

    regards,

    Semih

    Andy
    Andy
    Keymaster

    I'll take a look at the shortcode to see if it's inheriting the gobal option for excerpt… it should be. Thinking about this though, I'm not sure if the AddThis is using shortcodes.


    Semih Sevinc
    Participant

    Hello Andy,

    any news on that issue?

    regards,

    Semih

    Andy
    Andy
    Keymaster

    Hi Semih,

    It all looked fine when I checked, I think it's letting code through as opposed to shortcode so in 2.9 I've introduced the option to zone out exactly what you require. I'll be releasing 2.9 shortly. 


    Semih Sevinc
    Participant

     

    Hi Andy,

     

    …I made some tests with your current 2.9 beta theme. The situation regarding excerpts is still the same.

     

    I think the problem is that Advanced Excerpt gets the full content of an article and applies filters (from the content filter chain) to it thus adding AddThis code. AddThis has an option to hide when it’s called within the context of an excerpt, but Advanced Excerpt circumvents this by the way it filters the content.

     

    I tried several approaches to solve this. The absolute minimal invasive solution I found is to change line 127 in advanced-excerpt.php to:

    $text = apply_filters(‘the_excerpt’, $text);

    This applies the excerpt filter chain to the text, et voilĂ , the AddThis option is respected again.

     

    I found that the integration of Advanced Excerpt into your theme seems to be incomplete. The option screen works only if the original plugin of Advanced Excerpt is installed in WordPress. Otherwise some Javascript is not found, some buttons are not working, and the options are always reset to default if you re-enter the option screen via navigation bar right after saving.

    I think it’s not only a problem with displaying the options, the options are really not saved correctly. If I remove the separate installation of Advanced Excerpt, so that the integrated version is used again, I can not get – for example – custom excerpts to work.

     

    regards,

    Semih

     

    P.S.: six o’clock in the morning. I need some sleep. Please forgive me in case I overlooked something, but I’d be happy if you could confirm some of my observations.

    Andy
    Andy
    Keymaster

    Hi Semih,

     

    The problem with altering that line of code is that the short codes are no long processed which is how this whole excerpt situation came about. I had numerous requests for having short codes within Galleries etc so I had to change the system. If that works for you then it maybe a case of that’s what you’ll need to change for this to work.

     

    I’ve updated the BETA again – although I never had an issue with the settings saving etc?

     

     


    Semih Sevinc
    Participant

    Hi Andy,

     

    I solved my issues with jQuery and I can live with the above solution. It’s no problem to change that single line when updating the theme.

    So, everything is fine again.

     

    regards,

    Semih

     

     

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.