News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Captcha url is wrong

Started by pzyhô, April 27, 2011, 10:17:37 PM

Previous topic - Next topic

pzyhô

Well i have a problem with my Captcha

I was installed 2.0 rc5 all worked perfect, then i installed mods and BacknBlack theme from Crip and the Captcha isnt Display in Backnblack but in Default theme and in Core it does.

After a long trying i found out that the Problem is here:

The text in red is the Captcha Preview from the Admin panel

Link of Core/Default Theme:
/forum/verificationcode/rand.f8b1197f1b3b23e4c5ef723bf0a4c65b/type.2/

Link of BacknBlack Theme:
/forum/verificationcode/rand.62d1f94dba751b22b3ff5ba352b165c5/type./2



and now if you see on Default it is type.2/ and on Backnblack type./2

my question now is how can i fix this ?

edit: well i dont know why but on Register it shows now first time a captcha but then if you click "Request another Image" it doesnt show the new one

Link of Register Captcha first time:
/forum/verificationcode/vid.register/rand.04f288df1a703e3ef3bbd276fbd0e0e7/

and after Request new one
/forum/register/http129e037addb3c19e4e56d5b9a375cf87

Thanks in advance
pzyhô
My Mods: click

CapadY


It look like an error in the theme you are using.
So contact the theme-author to solve this.

Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

Arantor

Not using one of the pretty URLs mods would actually solve your problem too.

pzyhô

Thank you Arantor it was SimpleSEF

if i turn it out all work fine,
but is there any fix for it ? cause SimpleSEF is very nice and i want use it
My Mods: click

Arantor

Ask the author in the "support and comments for this mod" thread for SimpleSEF

NanoSector

SimpleSEF/PrettyURL's will only "destroy" the modding capability of your forum...
Mods won't support it nor do themes.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Arantor

You know how they work, right? Other than obscure circumstances like this, SSEF works just fine for almost every occasion. Considering that both of them work in the rewrite buffer, *after* the theme has run, I'm not sure exactly what basis your "destroy the modding capability of your forum" comment has.

NanoSector

Quote from: Arantor on April 28, 2011, 01:39:25 PM
You know how they work, right? Other than obscure circumstances like this, SSEF works just fine for almost every occasion. Considering that both of them work in the rewrite buffer, *after* the theme has run, I'm not sure exactly what basis your "destroy the modding capability of your forum" comment has.
Most mods/themes will get confused with the URLs.
I will not allow such modification at the MAP3 mod site, it will break ALL functionality of most modules (unless the mod author wants to rewrite the modules...).
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Arantor

No... they won't. Both SimpleSEF and Pretty URLs rewrite the links AFTER mods output them, and process them before mods get anywhere near them. So, no it won't break much functionality.

I should note that SimpleDesk worked just fine last time I tested it with SimpleSEF (which was a while ago) and that generates many, many links.

pzyhô

I asked now the Author in the Thread of it, and i saw with the searchfuntion they talked a long time ago about the Captcha problem, they mean it is fixed but its not cause i got that error. i hope you understand my bad english :)
My Mods: click

Arantor

No, you got a different error to that one. It is not the same error, it just has a similar symptom.

NanoSector

Quote from: Arantor on April 28, 2011, 01:49:10 PM
No... they won't. Both SimpleSEF and Pretty URLs rewrite the links AFTER mods output them, and process them before mods get anywhere near them. So, no it won't break much functionality.

I should note that SimpleDesk worked just fine last time I tested it with SimpleSEF (which was a while ago) and that generates many, many links.
Actually, I have seen some mods that require the use of the links after they have been outputted....with which they will fail, thus break functionality.

As I said, MAP3 also does this to gather current session information, to process data. It's package manager is one example -- it constantly streams the links through it's "cache" to gather package steps & information.

Quote from: Arantor on April 28, 2011, 01:51:07 PM
No, you got a different error to that one. It is not the same error, it just has a similar symptom.
You can read his mind? Cool.

But if that error needs fixing again....go for it. I won't bother myself with SimpleSEF/whatever, I think it's a waste of time.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

pzyhô

Should i mark this topic as Solved ? Cause i asked in the Author Thread.
My Mods: click

NanoSector

Quote from: pzyhô on April 28, 2011, 01:57:09 PM
Should i mark this topic as Solved ? Cause i asked in the Author Thread.
I guess so.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

pzyhô

Quote from: Yoshi2889 on April 28, 2011, 01:57:49 PM
Quote from: pzyhô on April 28, 2011, 01:57:09 PM
Should i mark this topic as Solved ? Cause i asked in the Author Thread.
I guess so.

Ok, Done ill hope the author can help me with the issue
My Mods: click

SlammedDime

Yoshi - most mods that break because of SimpleSEF or PrettyURLs are likely using poor coding practices or not following SMF's 'standards' for URLs... can't blame the authors of SimpleSEF or PrettyURLs for the incompetencies of other mod authors.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Arantor

Quote from: Yoshi2889 on April 28, 2011, 01:53:02 PM
Actually, I have seen some mods that require the use of the links after they have been outputted....with which they will fail, thus break functionality.

Show me one mod other than the pretty URLs mods, the portals and SimpleDesk that explicitly search through the output buffer for things to be rewritten. By the time it gets to the output buffer, all links have been output, it's just pure HTML at that point.

SSEF/PURLs sit and rewrite the contents of the buffer, the portals use the buffer for injecting copyright and SimpleDesk uses it to mess with the links in the header in a themeless way under specific circumstances. (Yes, there is one obscure case where SSEF/PURLs will interfere with SimpleDesk, but it's very rare and rare enough that it doesn't bother me, especially when the cure is as simple as uninstalling SimpleSEF and reinstalling it after to push the order of buffers around.)

Quote
As I said, MAP3 also does this to gather current session information, to process data. It's package manager is one example -- it constantly streams the links through it's "cache" to gather package steps & information.

And where the changes are made is not a cache. It's an output buffer, which is something rather different.

QuoteYou can read his mind? Cool.

But if that error needs fixing again....go for it. I won't bother myself with SimpleSEF/whatever, I think it's a waste of time.

No, but I can read his bug report and the the report we made last year to see that while the CAPTCHA is broken, it seems to be broken in different ways which kind of suggests it's a different bug, no?

NanoSector

Quote from: SlammedDime on April 28, 2011, 02:03:36 PM
Yoshi - most mods that break because of SimpleSEF or PrettyURLs are likely using poor coding practices or not following SMF's 'standards' for URLs... can't blame the authors of SimpleSEF or PrettyURLs for the incompetencies of other mod authors.
I don't blame the authors of the mods (they are trying to do their best) -- nor the authors of the URL stuff, but some mods -- and sometimes also themes (had that happen twice) -- just totally break.

Quote from: Arantor on April 28, 2011, 02:06:17 PM
Quote from: Yoshi2889 on April 28, 2011, 01:53:02 PM
Actually, I have seen some mods that require the use of the links after they have been outputted....with which they will fail, thus break functionality.

Show me one mod other than the pretty URLs mods, the portals and SimpleDesk that explicitly search through the output buffer for things to be rewritten. By the time it gets to the output buffer, all links have been output, it's just pure HTML at that point.

SSEF/PURLs sit and rewrite the contents of the buffer, the portals use the buffer for injecting copyright and SimpleDesk uses it to mess with the links in the header in a themeless way under specific circumstances. (Yes, there is one obscure case where SSEF/PURLs will interfere with SimpleDesk, but it's very rare and rare enough that it doesn't bother me, especially when the cure is as simple as uninstalling SimpleSEF and reinstalling it after to push the order of buffers around.)
The private SMF-MAP3 theming bridge (private = against the license) for SMF reads the URLs. It needs to know that, to validate if the URL is correct.

Quote
Quote
As I said, MAP3 also does this to gather current session information, to process data. It's package manager is one example -- it constantly streams the links through it's "cache" to gather package steps & information.

And where the changes are made is not a cache. It's an output buffer, which is something rather different.
MAP3's dev version caches the URLs, it needs to be installed via a special modification which I am not gonna distribute since it isn't complete and I am not looking for more critique on my work..

Actually I don't bother myself with the URL stuff. It's a waste of time and resources to me.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

SlammedDime

Quote(Yes, there is one obscure case where SSEF/PURLs will interfere with SimpleDesk, but it's very rare and rare enough that it doesn't bother me, especially when the cure is as simple as uninstalling SimpleSEF and reinstalling it after to push the order of buffers around.)
The latest version of SimpleSEF should fix this... I purposely coded in fixing of the integration hooks to make sure SimpleSEF was first to run page load and last to run when the output comes.

    public static function fixHooks($force = FALSE)
    {
        global $smcFunc, $modSettings;

        // We only do this once an hour, no need to overload things
        if (!$force && cache_get_data('simplesef_fixhooks', 3600) !== NULL)
            return;

        $request = $smcFunc['db_query']('', '
            SELECT variable, value
            FROM {db_prefix}settings
            WHERE variable LIKE {string:variable}',
            array(
                'variable' => 'integrate_%',
            )
        );

        $hooks = array();
        while (($row = $smcFunc['db_fetch_assoc']($request)))
            $hooks[$row['variable']] = $row['value'];
        $smcFunc['db_free_result']($request);
        self::$queryCount++;

        $fixups = array();
        if (!empty($hooks['integrate_pre_load']) && strpos($hooks['integrate_pre_load'], 'SimpleSEF') !== 0)
        {
            $fixups['integrate_pre_load'] = 'SimpleSEF::convertQueryString,' . str_replace(',SimpleSEF::convertQueryString', '', $hook['integrate_pre_load']);
        }
        if (!empty($hooks['integrate_buffer']) && strpos($hooks['integrate_buffer'], 'SimpleSEF') !== 0)
        {
            $fixups['integrate_buffer'] = 'SimpleSEF::ob_simplesef,' . str_replace(',SimpleSEF::ob_simplesef', '', $hook['integrate_buffer']);
        }
        if (!empty($hooks['integrate_exit']) && strpos($hooks['integrate_exit'], 'SimpleSEF') !== 0)
        {
            $fixups['integrate_exit'] = 'SimpleSEF::fixXMLOutput,' . str_replace(',SimpleSEF::fixXMLOutput', '', $hook['integrate_exit']);
        }

        if (!empty($fixups))
            updateSettings($fixups);

        // Update modSettings
        foreach ($fixups as $hook => $functions)
            $modSettings[$hook] = str_replace($hooks[$hook], $fixups[$hook], $modSettings[$hook]);

        cache_put_data('simplesef_fixhooks', TRUE, 3600);

        self::log('Fixed up integration hooks: ' . var_export($fixups, TRUE));
    }


(side note, it is theme related, not related to this mod.  Crip has two extra new lines at the top of index.template.php which cause an issue with the image displaying)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Arantor

Oh, that's awesome news :) The odds of running into it were rare enough anyway but this means it just shouldn't be an issue (and in fact, SSEF 2.0 will never conflict with SimpleDesk even with the crazy stuff it does)

Advertisement: