Support Forum

Spoiler reveal not working

19 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

I think I might have stumbled on the problem here. Although why I too see your issue yet do not see it using the same code on this site is a conundrum. And then again – maybe I am wrong anyway about finding it. All  we can do is ask you to try this. It will involve a small edit to the sp-api-filters.php file.

The function in that file is way down at about line 1940 and is called sp_filter_display_spoiler().

Find the line of code that starts:

$out.= "<a id='spRevealLink'$spoilerID'

You will see that there is an errant and stray apostrophe in there that should not be there. The oine before the $. It should be:

$out.= "<a id='spRevealLink$spoilerID'

Can you make that change and see if that corrects your issue.

SP sptab
sptab
Member

It’s working now, you’re a star ! kiss

The changed line is 1957 not 1940 on my original sp-api-filters.php file (rev. 14726)

That problem originates from the original SP package I believe ? (my sp-api-filters.php was restored from the original SP as I mentioned yesterday). 

 

Thanks again !

YS Yellow Swordfish
Yellow Swordfish
Member

I don’t even want to think about different line numbers!

The really odd thing is that it still worked – with that code – on this site here. So here we were still seeing the rest of the ‘a’ tag data settings that were visibly missing from your site. That’s why these sort of situations can be so hard to pin down and spot solutions for,

That was made more difficult on your site as all the single quotes were being changed to doubles! Again – I have no idea why!

Anyway – the important thing is that it is fixed and working and sorry it took so long. It was one of those obvious things staring you in the face that you could not see!

SP sptab
sptab
Member

I just gave the correct line numbers in case other forum users with latest SP build here want to easily apply the fix. Will this spoiler fix be pushed to next SP update ?

The difference between sites probably relates to PHP versions and PHP ini settings, which I admit can be troublesome. About my site changing single quotes to double, I’ll check why but it’s probably a PHP configuration topic as well.

Thanks again for your help, I feel my small financial contribution to the support forum makes more sense now wink

Cheers.

YS Yellow Swordfish
Yellow Swordfish
Member

sptab said
I just gave the correct line numbers in case other forum users with latest SP build here want to easily apply the fix. Will this spoiler fix be pushed to next SP update ?

But that’s the odd thing. I believe the line number I quoted should be correct fore the current version although I was testing and working with 5.7.4 code so there may have been some small changes before this. But yes – the fix is already in the next update build – probably due any day actually.

The difference between sites probably relates to PHP versions and PHP ini settings, which I admit can be troublesome. About my site changing single quotes to double, I’ll check why but it’s probably a PHP configuration topic as well.

You are most probably right – I am far from being that cognisant with all the byways of the php.ini file 🙂

Thanks again for your help, I feel my small financial contribution to the support forum makes more sense now wink

Cheers.  

 Thank you – that is very much appreciated.