Try the Demo

Magento

eCommerce Software for Online Growth

Magento Forum

Our new hosted solution for small & emerging businesses
   
Page 1 of 4
Installation - Web access options - Base URL validation (Magento 1.4.2.0)
 
Nico1899
Jr. Member
 
Total Posts:  22
Joined:  2010-10-08
 

Hi,

i try to install magento with the downloader (Version 1.3.2.1) and received at Base URL in \"Web access options\” this error:

Please enter a valid URL. Protocol is required (http://, https:// or ftp://)

i use url like http://dev/magento-shop.com

it say its not valid ... if i change it to http://dev.com/magento-shop.com it works ... but i must change the base url in database back to \"http://dev/magento-shop.com\" !

solutions?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Devz
Jr. Member
 
Total Posts:  7
Joined:  2010-12-06
 

http://dev/magento-shop.com is not valid, unless you own the domain ‘dev’ which you cannot.

I think you meant, http://dev.magento-shop.com
(dev = subdomain, magento-shop.com = domain)

http://dev.com/magento-shop.com is also wrong as ‘dev.com’ in that instance is the domain, magento-shop.com is a folder.

Hope this helps, ive been struggling with a reliable development environment myself.

 
Magento Community Magento Community
Magento Community
Magento Community
 
marcoclikka
Jr. Member
 
Total Posts:  8
Joined:  2010-11-02
 

I am experiencing a similar problem.
With localhost address the field validation fails: http://localhost/magento2 - which is a valid domain name.

After changing the url to “http://localhost.com/magento2” as in previous post, the validation goes well, but after submitting the data to proceed to the next step of the installation, it reloads the same “Web Access Options” page, resetting the values.

Image Attachments
screen.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
Nico1899
Jr. Member
 
Total Posts:  22
Joined:  2010-10-08
 

no, this domain is in our network correct. http://dev is our development-server and contains a lot of subDIRECTORYS.

Magento 1.4.1.1 works correctly and accpect http://dev/abc

 
Magento Community Magento Community
Magento Community
Magento Community
 
furnitureforyoultd
Enthusiast
 
Total Posts:  767
Joined:  2009-03-09
 

in the new install config page validate-url is added in the class for base url, maybe removing it will let you put what you want?

1.4.1.1

<input type="text" name="config[unsecure_base_url]" id="base_url" value="<?php echo $this->getFormData()->getUnsecureBaseUrl() ?>" title="<?php echo $this->__('Base URL') ?>" class="required-entry input-text" />
and
<input type="text" name="config[secure_base_url]" id="secure_base_url" value="<?php echo $this->getFormData()->getSecureBaseUrl() ?>" title="<?php echo $this->__('Secure Base URL') ?>" class="required-entry input-text" />

1.4.2.0

<input type="text" name="config[unsecure_base_url]" id="base_url" value="<?php echo $this->getFormData()->getUnsecureBaseUrl() ?>" title="<?php echo $this->__('Base URL') ?>" class="required-entry validate-url input-text" />
and
<input type="text" name="config[secure_base_url]" id="secure_base_url" value="<?php echo $this->getFormData()->getSecureBaseUrl() ?>" title="<?php echo $this->__('Secure Base URL') ?>" class="required-entry validate-url input-text" />

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nico1899
Jr. Member
 
Total Posts:  22
Joined:  2010-10-08
 

this should be fixed to validate all correct url in future.

is the validation method from magento or zend framework?

 
Magento Community Magento Community
Magento Community
Magento Community
 
marcoclikka
Jr. Member
 
Total Posts:  8
Joined:  2010-11-02
 

A temporary fix: just disable the validation check in the css property of the input field.
Use a tool like Firebug to edit the html of the page, delete the css property “validate-url” of the input field and re-submit the form, it should go without any problems, overriding the validation.

As said this is a temporary fix to just proceed with an installation. I think the problem is in the js library and the validation patterns.
Future releases of Magento should consider also the localhost installation (as there are more modifications to do in order to function properly in localhost environment).

 
Magento Community Magento Community
Magento Community
Magento Community
 
furnitureforyoultd
Enthusiast
 
Total Posts:  767
Joined:  2009-03-09
 

validate-url is in js\prototype\validation.js

['validate-url''Please enter a valid URL. Protocol is required (http://, https:// or ftp://)', function (v{
                
return Validation.get('IsEmpty').test(v) || /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(v)
            
}],

 
Magento Community Magento Community
Magento Community
Magento Community
 
marcoclikka
Jr. Member
 
Total Posts:  8
Joined:  2010-11-02
 
furnitureforyoultd - 09 December 2010 06:00 AM

validate-url is in js\prototype\validation.js

['validate-url''Please enter a valid URL. Protocol is required (http://, https:// or ftp://)', function (v{
                
return Validation.get('IsEmpty').test(v) || /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(v)
            
}],

The current validation pattern requires a domain name extension, so that domains like http://localhost/ or http://dev/ are not accepted.
Clearly these domains are for developement use only, in a standard production environment the validation works correctly.

 
Magento Community Magento Community
Magento Community
Magento Community
 
writemcodeboy
Member
 
Avatar
Total Posts:  32
Joined:  2009-09-18
 

Thank for the direction!

Modified mine as follows and had no trouble ...

['validate-url''Please enter a valid URL. Protocol is required (http://, https:// or ftp://)', function (v{
                
return Validation.get('IsEmpty').test(v) || /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(v) || /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(v)
            
}],

 Signature 

writemcodeboy

 
Magento Community Magento Community
Magento Community
Magento Community
 
RaphaelDavid
Jr. Member
 
Total Posts:  1
Joined:  2010-12-11
 

Hello, brothers.
Sorry for my bad english, i am brazilian…
Ok, to solve this problem is so simple, go to the line 500 of /js/prototype/validation.js and you will replace this:

['validate-url''Please enter a valid URL. Protocol is required (http://, https:// or ftp://)', function (v{
                
return Validation.get('IsEmpty').test(v) || /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(v)
            
}],
to this:
['validate-url''Please enter a valid URL. Protocol is required (http://, https:// or ftp://)', function (v{
                
return true
            }]
,
Your problem will be solved!

That post is my first contribuition on forum, so sorry for my english.

 
Magento Community Magento Community
Magento Community
Magento Community
 
marcoclikka
Jr. Member
 
Total Posts:  8
Joined:  2010-11-02
 
RaphaelDavid - 11 December 2010 10:02 AM

Hello, brothers.
Sorry for my bad english, i am brazilian…
Ok, to solve this problem is so simple, go to the line 500 of /js/prototype/validation.js and you will replace this:

['validate-url''Please enter a valid URL. Protocol is required (http://, https:// or ftp://)', function (v{
                
return Validation.get('IsEmpty').test(v) || /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(v)
            
}],
to this:
['validate-url''Please enter a valid URL. Protocol is required (http://, https:// or ftp://)', function (v{
                
return true
            }]
,
Your problem will be solved!

That post is my first contribuition on forum, so sorry for my english.

Yes, a very fast solution! smile
Be careful, though, as you are completely disabling the validation function inside Magento, it can be dangerous.
A bit of regex coding should be the best approach…

 
Magento Community Magento Community
Magento Community
Magento Community
 
tgagne@seguece.com
Jr. Member
 
Total Posts:  2
Joined:  2010-12-10
 

That was helpful, and now my installation isn’t complaining about the URL.

Instead, it keeps re-drawing that same page and asking for the information all over again.  I’ve provided values for all the *-tagged fields, and still no love.

Groan.

I’m trying to install Magento to compare against Avetti.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tgagne@seguece.com
Jr. Member
 
Total Posts:  2
Joined:  2010-12-10
 

Is there an installation error log file I should be looking at for clues regarding what it’s complaining about?

 
Magento Community Magento Community
Magento Community
Magento Community
 
brunomarshall
Guru
 
Total Posts:  367
Joined:  2009-08-04
 

Hi,
If you are trying to install in localhost and using Xampp your url will be http://127.0.0.1/and if you are using any other local server then please see in control panel of your local server you can find localhost url in the form of ip when you use this url you can easily pass base url validation

 Signature 

Magento Themes Experts: Magento Themes | Download magento themes | ECommerce Developer

 
Magento Community Magento Community
Magento Community
Magento Community
 
amrit
Jr. Member
 
Total Posts:  11
Joined:  2010-08-16
 
brunomarshall - 13 December 2010 07:43 PM

Hi,
If you are trying to install in localhost and using Xampp your url will be http://127.0.0.1/and if you are using any other local server then please see in control panel of your local server you can find localhost url in the form of ip when you use this url you can easily pass base url validation

works smile

 Signature 

amritheda

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 4
 
© Copyright 2012 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
704132 users|1585 users currently online|499591 forum posts