News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Autofill Forms

Started by IceXaos, September 24, 2010, 01:22:57 PM

Previous topic - Next topic

IceXaos

The forms which autofill "<input id='to_control' " will no longer work.  I'm unsure of when this could have happened, & I don't believe this is due to a MOD, though it could be, I just don't think I've installed any during the time this went wrong.

Could someone tell me which file controls this, so I could try using a backup to fill this bit in?

Thanks.

Hj Ahmad Rasyid Hj Ismail

IX, I think the browsers do that. You might want to check your browser settings or cookies etc...

Alex' Manson

ice, your forum auto fills mah user/pass when i register or try to login

IceXaos

Quote from: ahrasis on September 24, 2010, 04:37:20 PM
IX, I think the browsers do that. You might want to check your browser settings or cookies etc...
I'm not talking about autocomplete, but the user selection that uses an autofill type, such as sending a PM from a blank page, selecting the user, and goin'.

Hj Ahmad Rasyid Hj Ismail

Ooh, ok. Just to note, it works just fine with mine. To to another browser or simply close and reopen your browser and site back.

gbsothere

Quote from: IceXaos on September 24, 2010, 04:57:44 PMI'm not talking about autocomplete, but the user selection that uses an autofill type, such as sending a PM from a blank page, selecting the user, and goin'.


Just a guess, IceXaos, and different functions use this, I realize, but, regarding personal messages, there is a reference in PersonalMessage.template.php that suggests that this is done with Javascript (and my hunch would be ../Themes/default/scripts/suggest.js).  A sample of the reference I'm talking about is this block:

// To and bcc. Include a button to search for members.
echo '
<dt>
<span', (isset($context['post_error']['no_to']) || isset($context['post_error']['bad_to']) ? ' class="error"' : ''), '>', $txt['pm_to'], ':</span>
</dt>';

// Autosuggest will be added by the JavaScript later on.
echo '
<dd>
<input type="text" name="to" id="to_control" value="', $context['to_value'], '" tabindex="', $context['tabindex']++, '" size="40" style="width: 130px;" class="input_text" />';

// A link to add BCC, only visible with JavaScript enabled.
echo '
<span class="smalltext" id="bcc_link_container" style="display: none;"></span>';

// A div that'll contain the items found by the autosuggest.
echo '
<div id="to_item_list_container"></div>';

echo '
</dd>';



I may be off, but it seems a logical place to start.   :)
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

IceXaos

Quote from: gbsothere on September 24, 2010, 05:03:32 PM
Quote from: IceXaos on September 24, 2010, 04:57:44 PMI'm not talking about autocomplete, but the user selection that uses an autofill type, such as sending a PM from a blank page, selecting the user, and goin'.


Just a guess, IceXaos, and different functions use this, I realize, but, regarding personal messages, there is a reference in PersonalMessage.template.php that suggests that this is done with Javascript (and my hunch would be ../Themes/default/scripts/suggest.js).  A sample of the reference I'm talking about is this block:

// To and bcc. Include a button to search for members.
echo '
<dt>
<span', (isset($context['post_error']['no_to']) || isset($context['post_error']['bad_to']) ? ' class="error"' : ''), '>', $txt['pm_to'], ':</span>
</dt>';

// Autosuggest will be added by the JavaScript later on.
echo '
<dd>
<input type="text" name="to" id="to_control" value="', $context['to_value'], '" tabindex="', $context['tabindex']++, '" size="40" style="width: 130px;" class="input_text" />';

// A link to add BCC, only visible with JavaScript enabled.
echo '
<span class="smalltext" id="bcc_link_container" style="display: none;"></span>';

// A div that'll contain the items found by the autosuggest.
echo '
<div id="to_item_list_container"></div>';

echo '
</dd>';



I may be off, but it seems a logical place to start.   :)
Could you tell me where the actual script is for it though?  It is using the to_control id, but it's not working.  I've checked Themes/default/scripts, but it's not any of them that are messed up, as I tried to replace them with ones that I know were from a working period, and they didn't, so I put the new back.

gbsothere

I see this in PersonalMessage.js

};
}

var oToControl = document.getElementById(this.opt.sToControlId);
this.oToAutoSuggest = new smc_AutoSuggest({
sSelf: this.opt.sSelf + '.oToAutoSuggest',
sSessionId: this.opt.sSessionId,
sSessionVar: this.opt.sSessionVar,
sSuggestId: 'to_suggest',
sControlId: this.opt.sToControlId,
sSearchType: 'member',
sPostName: 'recipient_to',
sURLMask: 'action=profile;u=%item_id%',
sTextDeleteItem: this.opt.sTextDeleteItem,
bItemList: true,
sItemListContainerId: 'to_item_list_container',
aListItems: this.opt.aToRecipients
});





Is this not what you mean?

(Actually, searching "control" with a text editor, this appears through the file.)
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

IceXaos

Quote from: gbsothere on September 24, 2010, 05:18:12 PM
I see this in PersonalMessage.js

};
}

var oToControl = document.getElementById(this.opt.sToControlId);
this.oToAutoSuggest = new smc_AutoSuggest({
sSelf: this.opt.sSelf + '.oToAutoSuggest',
sSessionId: this.opt.sSessionId,
sSessionVar: this.opt.sSessionVar,
sSuggestId: 'to_suggest',
sControlId: this.opt.sToControlId,
sSearchType: 'member',
sPostName: 'recipient_to',
sURLMask: 'action=profile;u=%item_id%',
sTextDeleteItem: this.opt.sTextDeleteItem,
bItemList: true,
sItemListContainerId: 'to_item_list_container',
aListItems: this.opt.aToRecipients
});





Is this not what you mean?

(Actually, searching "control" with a text editor, this appears through the file.)
I've searched them, all of'em.  I replaced it with one that I know was working, and it still didn't work, so there must be another issue.  I don't cache anything, and cleared browser cache during tests.

gbsothere

I guess a mod might be considered then.  If you have a lot of them, that will certainly complicate things, unless you can remember which one was added before this issue began.  Also...  it would be interesting to know, if you use a custom theme, if the auto suggest works in default, but I imagine you've already determined that.

Doing a search here with "auto suggest" (in quotes) seems to hint at some mods that might have an effect.

My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

IceXaos

The only MOD I believe may have been the issue is Aeva.  I use the default theme, so nothin' there.

gbsothere

Just glancing through its edits, I don't see how, but stranger things have happened. 

If you're reasonably sure it's a mod, this isn't a suggestion you'd welcome if you have a lot of mods but, if not, I believe I would uninstall them (especially if you were able to install them with your package manager and can easily do so again) and start with a fresh batch of files, then, if Auto Suggest is working, add back one mod at a time, until it stops and that will alert you to which mod is causing this.  Of course, back up everything, first. Another way that's not obtrusive on your live forum is install a fresh forum in another directory on your site (with its own fresh database, etc.) and then begin adding the same mods to it until Auto Suggest fails.  Then you'll know which mod is the bugger and can remove it from your live forum, or at least talk to the mod author about the effects of it on Auto Suggest.

Of course, that's overkill.  I just like to tinker with things.   :D
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Hj Ahmad Rasyid Hj Ismail

I'd do exactly the same with gbsothere. Otherwise, I'll end up keep guessing in the dark.

IceXaos

Starting fresh ain't exactly a great option for me, as a lot of what I code myself, I throw straight into it rather than taking the extra time to make it a MOD.  Beyond the things I've written, I do got a lot of MODs that won't uninstall without doing a lot of manual edits, which I guess wouldn't matter since I'd be starting from fresh files, but installing all of them also includes the manual edits.  The things I'm most worried about are my own MODs though, as there's no simple way to port them.

Advertisement: