What source page has captcha image

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
foodsleuth
Commander (CMDR)
Commander (CMDR)
Posts: 139
Joined: Wed Mar 31, 2010 8:59 pm

What source page has captcha image

Post by foodsleuth » Mon Apr 16, 2018 7:42 am

The captcha image used for "email a friend" has no alt tag. I just want to find out where that code is (on what page) so I can add it. I get a zillion errors during seo scans.
Thanks mucho!
Barb

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: What source page has captcha image

Post by jguengerich » Mon Apr 16, 2018 9:27 am

Looks like Conlib\ProductTellAFriend.ascx
Jay

foodsleuth
Commander (CMDR)
Commander (CMDR)
Posts: 139
Joined: Wed Mar 31, 2010 8:59 pm

Re: What source page has captcha image

Post by foodsleuth » Mon Apr 16, 2018 10:25 am

Hi Jay,
Thanks much. It's still unclear where to put the alt tag.
The code is different than the typical <img id="logo" src="/Images/header_logo.png" alt="log image" width="233" height="106"
Rather, there are lines of code like this:
td>
<asp:UpdatePanel ID="CaptchaPanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="captchaWrapper">
<cb:CaptchaImage ID="CaptchaImage" runat="server" Height="80px" Width="150px" EnableViewState="False" /><br />
<asp:LinkButton ID="ChangeImageLink" runat="server" Text="select a different image" CausesValidation="false" EnableViewState="False"></asp:LinkButton>
</div>
</ContentTemplate>
</asp:UpdatePanel>
I guess because the image is created in code? Any further advice you can offer would be appreciated.
Thanks much,
Barb

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: What source page has captcha image

Post by jmestep » Mon Apr 16, 2018 9:52 pm

The captcha image is in compiled source code. <cb:xxxxx
<cb:CaptchaImage ID="CaptchaImage" runat="server" Height="80px" Width="150px" EnableViewState="False" />
You could try adding an alt tag since it accepts height and width parameters. I don't know if it would work, though.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: What source page has captcha image

Post by jguengerich » Tue Apr 17, 2018 2:07 am

Just add the AlternateText parameter to the CaptchaImage control:

Code: Select all

<cb:CaptchaImage ID="CaptchaImage" runat="server" Height="80px" Width="150px" AlternateText="test" EnableViewState="False" /><br />
Jay

foodsleuth
Commander (CMDR)
Commander (CMDR)
Posts: 139
Joined: Wed Mar 31, 2010 8:59 pm

Re: What source page has captcha image

Post by foodsleuth » Tue Apr 17, 2018 2:58 am

Hi Again!
I tried modifying that line as you show in the ProductTellAFriend.ascx but the server objected mightily! Unless that is the wrong place I guess it doesn't work.
Thanks!
Barb

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: What source page has captcha image

Post by jguengerich » Tue Apr 17, 2018 3:07 am

What error did you get?
Jay

foodsleuth
Commander (CMDR)
Commander (CMDR)
Posts: 139
Joined: Wed Mar 31, 2010 8:59 pm

Re: What source page has captcha image

Post by foodsleuth » Tue Apr 17, 2018 3:30 am

Hi, the server crashed, server not found, I remove the words I added and all was good again

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: What source page has captcha image

Post by jguengerich » Tue Apr 17, 2018 3:57 am

Hmm, not sure what happened then. I tried it on my test server and it worked fine. The page loaded, and Firefox's Inspector tool showed that the captcha image html element had an "alt" tag. Are you sure you had the spaces and quotes correct in the source?
Jay

foodsleuth
Commander (CMDR)
Commander (CMDR)
Posts: 139
Joined: Wed Mar 31, 2010 8:59 pm

Re: What source page has captcha image

Post by foodsleuth » Tue Apr 17, 2018 4:30 am

Good lord now I broke the page, getting server error. I restored good copies but I still get server error on the darn product page

foodsleuth
Commander (CMDR)
Commander (CMDR)
Posts: 139
Joined: Wed Mar 31, 2010 8:59 pm

Re: What source page has captcha image

Post by foodsleuth » Tue Apr 17, 2018 4:42 am

So, once again I've risen to the highest level of incompetency. I fixed it, just copied the wrong backup. Clearly, I need to have someone else do it. Where are error logs stored, I could look up and at least see why what I did made such as mess of things. I even forgot I could just see the log from my admin. here is the error, fyi:

An error has occured at https://www.xxx.com/shop/product.aspx?productid=588
Exception: c:\Websites\store.gourmetsleuth.com\ConLib\ProductTellAFriend.ascx.cs(32): error CS0103: The name 'CaptchaImage' does not exist in the current context Stack Trace: at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate) at System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) at System.Web.UI.Page.get_Master() at System.Web.UI.Page.ApplyMasterPage() at System.Web.UI.Page.PerformPreInit() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Inner Exception: c:\Websites\store.gourmetsleuth.com\ConLib\ProductTellAFriend.ascx.cs(32): error CS0103: The name 'CaptchaImage' does not exist in the current context Inner Exception Stack Trace: at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate) at System.Web.UI.BaseTemplateParser.GetReferencedType(VirtualPath virtualPath, Boolean allowNoCompile) at System.Web.UI.BaseTemplateParser.GetUserControlType(VirtualPath virtualPath) at System.Web.UI.MainTagNameToTypeMapper.ProcessUserControlRegistration(UserControlRegisterEntry ucRegisterEntry) at System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
Last edited by foodsleuth on Tue Apr 17, 2018 6:17 am, edited 1 time in total.

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: What source page has captcha image

Post by jguengerich » Tue Apr 17, 2018 4:57 am

You can view errors by going to Help > Error Log in the Admin area, assuming you haven't already deleted the the errors from that same page. If you delete them from there, they are only deleted from the database, not the text log file. The text log file(s) are at [Site root]\App_Data\Logs on the server. App.log is the current general error log, App.log.nn are older ones. Errors are never deleted from the text log files.
Jay

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: What source page has captcha image

Post by jguengerich » Tue Apr 17, 2018 5:06 am

You may need to use stop IIS (in IIS Manager, select the server from the tree on the left, click Stop on the right), then make your change, then start IIS again (same as stop, but click Start on the right). Maybe post your proposed changed ProductTellAFriend.ascx here first, maybe we'll notice something?

EDIT (x2): From those two log entries, seems like the compiler isn't "seeing" everything in the .ascx file when it is compiling the .ascx.cs file. No errors before that?
Jay

foodsleuth
Commander (CMDR)
Commander (CMDR)
Posts: 139
Joined: Wed Mar 31, 2010 8:59 pm

Re: What source page has captcha image

Post by foodsleuth » Tue Apr 17, 2018 6:12 am

Im not sure if my store is in a separate app pool from my main site? I did reset the whole site twice. No errors before that. But here is my sequence of events.

1. I edited the file to add the alt info.
2. I checked the site, it showed server error.
3. I replaced with the old code (but I didn't replace the correct file ascx vs cs)
4. Then I tried just cutting and pasting your line in, deleted the other out, that did not work.
5. Then I replaced the correct file from the wrong backup
6. Then I replaced both files (just to make sure) and all was happy again.

When I have time to try this again, and I will, I'll do it at a less busy time. Now I know original files are back on, I'll try the edit again. I don't have a qa server so all tests, good or bad are live. (UGH)
Thanks so much for your assistance, you've been great!

Barb

Post Reply