QuickPoll on Newsreader-Page
Hello,
I have embedded a QuickPoll module on a newsreader page in a blog. The poll is there, but if one clicks on the "results" button the results are being displayed correctly - but the news entry is gone. That does not happen if one votes and hits the "submit" button - then everything works fine. Does anybody know a solution to that problem?
Regards from Germany
Oliver
Re: QuickPoll on Newsreader-Page
This is because the results is a parameter passed in the URL "results/", so the parameter is wiping out the newsreader parameter "/items". This is a difficult situation, because even if I add it using the "addToUrl()" function, there is no guarantee that the function will add the parameter correctly in combination with every and all types of extensions.
Re: QuickPoll on Newsreader-Page
Hello thyon,
thanks for your response! I understand the problem. Even if it may not work for all extensions - would it be possible for me to add some lines of code to the extension to make it work for the newsreader in my case? If that could work: which lines would that be and where would I have to add them?
Regards from the Baltic Sea shore
Oliver
Re: QuickPoll on Newsreader-Page
It seems I was clever already. The problem is that I didn't start the addToUrl function's parameters with an ampersand, so the correct code should be (add the ampersand before "action"):
Code:
$this->addToUrl('&action=results')
... there is only 1 occurrence of this statement above in ModuleQuickPoll and ModuleQuickPollList...
Re: QuickPoll on Newsreader-Page
Re: QuickPoll on Newsreader-Page
Hey,
I've tried it - unfortunately it didn't work out. I've set the ampersand in ModuleQuickPoll and ModuleQuickPollList like this:
Code:
? '<a href="'.$this->addToUrl('&action=results', true).'
But still the URL of the results page is like this:
Code:
http://www.thedomain.tld/blog-artikeldetails/action/results.html
The "/items" parameter is not there. Did I make a mistake?
Regards from Germany
Oliver
Re: QuickPoll on Newsreader-Page
That's wrong. the addToUrl must add to the existing parameters. Are you sure you're not using folderurl or urlcleaner?
Anyways, it will take a while to code it therefore for all possible methods. Anyone else can help out quickly?
Re: QuickPoll on Newsreader-Page
No, I don't use one of those extensions. Maybe the solution is to be found somewhere in the Contao URL rewrite rules? I've set the URL rewrite to true, but the other option "Don't use page aliases" to false.
Meanwhile, I have deactivated the QuickPoll module on the newsreader page. It *does* work on the newslisting page.
Thanks for your help!
Regards,
Oliver