Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Component in a "Search" doesn't work
#1
I have a problem.
I need to have the latest news of my website on the homepage.

Every news page has a list of other news, generated via a component (the name of the component is "elenconews" - in italian, it stands for "list of the news").

When I visit the single news page, everything works as it should.

My home page has only this script.

Code:
(% searchresults tags:news numWords:-1 order:reverseurl max=1 )

The component {% elenconews %} I inserted in every news page, here, doesn't work.

Here, you can see the home page, with the component not working
http://new.sandalj.com

here, you can see a news page, with the component WORKING
http://new.sandalj.com/082620121045

Here, you can see the italian version of the site, which is exactly the same, but correctly running.
http://new.sandalj.it

thanks!
Reply
#2
Sounds like the home page is not having a content filter run on it.
Why not add the component to your template instead.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
I just can't do what are you suggesting me.

The problem is:
The component included in each news page does work.
This is the format of each news page

Code:
*** content ***
{% elenconews %}

The home page is something like this

Code:
(% searchresults tags:news numWords:-1 order:reverseurl max=1 %)

So, I expect every time a home page is generated, it should get the content of the news page AND the component working.
This happens every time a page is directly accessed

BUT this doesn't happen in my homepage.

IF I use this on my homepage

Code:
(% searchresults tags:news numWords:-1 order:reverseurl max=1 %)

{% elenconews %}

The component included in the search results DOESN'T WORK
BUT the component directly scripted in my homepage DOES.


Here is another issue, that may help in understanding the problem
Have a look to this link:

http://new.sandalj.com/index-1

These components are not working
Code:
{% youmid QnVWEozYvf4%}
{% youmid jpxn6feAyZ8%}

these contents are not correctly undestood by the page, which echoes me these as plain text.
thank you (and please forgive me for my bad english)
Reply
#4
That still does not explain why you cannot make a template for news pages and a seperate template for index page, and call the component directly through getcomponent and not using Dynpages. It will fix yuor problem and you wont have to stick your comp tag on every news page.

Or just add the component to bottom of your main template if it will be on every page.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
(2013-02-19, 01:00:13)shawn_a Wrote: That still does not explain why you cannot make a template for news pages and a seperate template for index page, and call the component directly through getcomponent and not using Dynpages. It will fix yuor problem and you wont have to stick your comp tag on every news page.

Or just add the component to bottom of your main template if it will be on every page.

Thank you for your help.
But I still can't undestand why
new.sandalj.it WORKS and new.sandalj.com DOESN'T!
Reply
#6
Because the content filter is not being run on it, the output of index is generated, the others are not.

You understand that component tokens are executed by the dypages plugin. They are not native. SO there is no control over when the plugin runs, your code might not be inserted until after the dynpages content filter runs.

This is especially so when you are using plugin generated content.

Use your component in your template and you avoid all those issues.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#7
Please have a look at this

http://www.sandalj.com/

The homepage is the very same in

http://new.sandalj.com/

The first works. The second doesn't.

This job is just a remake of the css and a little redesign of the original (ulgy!) website.
Same contents, same structure.
Same plugins uploaded.
Same host.

Sad
Reply
#8
(2013-02-19, 03:39:31)bidierre Wrote: I think the problem is in my version of the DynPages plugin.

No, it is exactly as shawn_a described it:
  • on the first server I18N Search is executed first and replaces the (search) place holder with the news, then DynPages runs, finds the (dynpages) place holders and replaces them.
  • on the other server DynPages is run first, doesn't find any (dynpages) place holders and does nothing, then I18N Search runs and replaces the (search) place holder. DynPages does NOT run again.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#9
(2013-02-19, 04:24:43)mvlcek Wrote:
(2013-02-19, 03:39:31)bidierre Wrote: I think the problem is in my version of the DynPages plugin.

No, it is exactly as shawn_a described it:
  • on the first server I18N Search is executed first and replaces the (search) place holder with the news, then DynPages runs, finds the (dynpages) place holders and replaces them.
  • on the other server DynPages is run first, doesn't find any (dynpages) place holders and does nothing, then I18N Search runs and replaces the (search) place holder. DynPages does NOT run again.

Now I've got the point.
How can I make DynPages run after I18N Search?
Is it possible?

I noticed this behaviour started when I disabled some plugins. When I activated them back, something went wrong.
Reply
#10
There is a plugin order plugin, it is not very tested, i would really recommend you use get_component in your template instead of dynpages. Plus you will shave 10s of ms off your pages.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#11
(2013-02-19, 04:36:21)shawn_a Wrote: There is a plugin order plugin, it is not very tested, i would really recommend you use get_component in your template instead of dynpages. Plus you will shave 10s of ms off your pages.

LONG LIFE TO PLUG-IN reorder!

Thank you!
Reply
#12
Oh-oh.

another issue

Now I'm tryng to insert dynamic contents in my right bar.

This is the div referred to the sidebar.
As you can see, I included both versions in the template


Code:
    <div id="sidebar">
        <span class="menulang">english | <a href="http://new.sandalj.it">ITALIANO</a><br /></span>
        <div class="section">
            <?php get_i18n_search_results(array('tags'=>'col-dx','words'=>' ','max'=>3,'numWords'=>-1,'HEADER'=>null)); ?>
            <?php get_component('col-dx'); ?>
        </div>
    </div>


this is the content of the col-dx component

Code:
<div id="news-dx">
<p>
</p>
<?php get_i18n_search_results(array('tags'=>'col-dx','words'=>' ','max'=>3,'numWords'=>-1,'HEADER'=>null)); ?>
<br><br>
</div>

You can see the results here:

http://new.sandalj.com/


Huh
Reply




Users browsing this thread: 1 Guest(s)