WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7 Datepicker
[resolved] Googlebot indexing imgPath url (5 posts)

  1. RavanH
    Member
    Posted 1 year ago #

    Hi,

    Happily using this excellent datepicker extension with my contact form, I started receiving error messages by Google Webmasters Tools about my site blocking the index spider bot thing. Worried, I log in to the account to find it had been trying to access the url http://mytoplevel.dmn/wp-content/plugins/contact-form-7-datepicker/img/beige/ where it met a 401 Unauthorized message. Which is as it should be but... Why was the bot trying this url in the first place? It turns out that it finds it in the following code and apparently thinks it should be indexed even if it is not a link!

    DatePicker_date576 = new JsDatePick({
    	useMode:2,
    	isStripped:false,
    	target:"date-576",
    	limitToToday:"0",
    	cellColorScheme:"beige",
    	dateFormat:"%d-%m-%Y",
    	imgPath:"http://mytoplevel.dmn/wp-content/plugins/contact-form-7-datepicker/img/beige/",

    Now for the life of me, why the almighty G would want to do that is beyond me, but as it stands, I am confronted with returning errors about the site blocking access... Very frustrating.

    So I was wondering if it would be possible to cloak the url in some way. I changed the responsible PHP to:

    $imgpath = explode(':', plugins_url('/img/'.get_option('cellColorScheme').'/', __FILE__), 2);
    $string .= '
    <script type="text/javascript">
    	jQuery(document).ready(function() {
    		DatePicker_'.$jssafeid.' = new JsDatePick({
    			useMode:'.get_option('useMode').',
    			isStripped:'.get_option('isStripped').',
    			target:"'.$id.'",
    			limitToToday:"'.get_option('limitToToday').'",
    			cellColorScheme:"'.get_option('cellColorScheme').'",
    			dateFormat:"'.get_option('dateFormat').'",
    			imgPath:"'.$imgpath[0].':" + "'.$imgpath[1].'",

    which does break up the url in to two parts "http:" + "//mytoplevel.dmn/wp-content/plugins/contact-form-7-datepicker/img/beige/" while not breaking the appearance of the datepicker. Now I'll have to wait and see if the Google bot is thrown off the scent...

    http://wordpress.org/extend/plugins/contact-form-7-datepicker/

  2. linzinz
    Member
    Posted 1 year ago #

    Hi RavanH,
    I seem to be having the same problem - Google is indexing wp-content/plugins/contact-form-7-datepicker/img/peppermint/
    I can't find the php code that you changed. Would you mind sharing where I can find the file. Also would I copy the whole .php file into my child theme?
    Would really appreciate your help!

  3. RavanH
    Member
    Posted 1 year ago #

    Hi linzinz, since version

    2.0
    Complete rewrite, using jquery-ui's datepicker

    this is no longer an issue. What version are you using?

  4. linzinz
    Member
    Posted 1 year ago #

    Thanks for responding RavanH!
    I have version 2.1

  5. RavanH
    Member
    Posted 1 year ago #

    Then look in your form page source code and you should not see any reference to wp-content/plugins/contact-form-7-datepicker/img/peppermint/ any more... If so, then go into your Google Webmasters Tools account and do two things:

    1. go to the Crawl Errors and find the related error(s), copy the exact URL and then mark the problem as solved; next

    2. go to the Remove URL page and submit a request for removal from the index using the URL you copied in step 1

    The error should not come back anymore :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags