ISSUE: I'm using FormIt and the redirect hook is not working for me.
It is redirecting to http://www.example.comPageName.html instead of http://www.example.com/PageName.html. It is not placing the forward slash after the page name.
Has anyone seen this issue before?
Here is my FormIt snippet.
[[!FormIt? &hooks=`email,redirect` &emailTpl=`MyEmailChunk` &emailTo=`mypersonalemail#email.com` &emailSubject=`Contact Us form submission` &redirectTo=`35` &emailFrom=`info#domainnamme.com`]]
Yes, the MyEmailChunk exists.
The email addresses are dummy values
The resource with id 35 is in the same context and is published and is hidden from the menus.
I'm using friendly urls.
If I try another resource it works.
URL generated in the following code
$url = $this->modx->makeUrl($this->formit->config['redirectTo'],$contextKey,$redirectParams,'full');
'full' means URL is absolute, prepended with site_url from config ( http://rtfm.modx.com/display/revolution20/modX.makeUrl ). Please check your site_url variable in /core/config/config.inc.php
Actually the site_url variable needs to be checked in the System Settings.
Make sure you have a trailing slash.
Related
Is there any way to change the browser URL of the request?
Lets say I've a '/articles/foo-bar' and I need to change this to '/articles/foo_bar'.
I've tried Routing Constraints and changed the request.path_info with no luck. I successfully changed the parameters but is not reflected in Browser URL.
PS: I want to replace '-' to '_' in browser URL in overall App.
EDITED:
Routes: get 'brands/:name-:id/articles', to: 'brands#articles'
Here name can be changed dynamically. And if a dash in name should be replaced by underscore.
You can use to_params method on your model
Please check this
http://blog.teamtreehouse.com/creating-vanity-urls-in-rails
May be a dumb question, but it's been bugging me recently. I see "URL=" inside alot of URL's, such as this one:
http://www.tierraantigua.com/search-2?url=http%3A%2F%2Flink.flexmls.com%2Fwws30ham
What exactly is this used to do? Is it part of the iFrame functionality? I know the last part of the URL (after the URL=) is the part being displayed in the iFrame, but I'm unsure of why it is included in the primary URL as well.
Thanks!
The url you see here is just a standard query parameter wit the name url and the encoded value http%3A%2F%2Flink.flexmls.com%2Fwws30ham which decodes to http://link.flexmls.com/Fwws30ham. Most of the times it is used for determining redirection or source information by the application you are using. It is entirely domain-specific and can have any meaning the website developer would like to use.
PHP GET
Description ΒΆ
An associative array of variables passed to the current script via the URL parameters.
$url = $_GET['url'];
echo $url; // http%3A%2F%2Flink.flexmls.com%2Fwws30ham
If I add slash / to the parameter of a page, even in encoded form %2F I get an error.
Sample URL:
http://mywebsite.com/somepage?param=dfgdfg%2F
Error:
Input string 'dfgdfg/' is not valid; the character '/' at position 7 is not valid.
I am trying to pass whole URL as parameter (to later redirect user to that URL) so there are a lot of slashes in there.
Is this a bug? Is there any workaround?
I could theoretically replace all slashes with something else than %2F but that is something I would attempt after everything else fails...
As I've learned this happens on Jetty only, which I use for development...
This custom service override solved the problem:
http://tapestry.1045711.n5.nabble.com/Customising-T5-URL-Encoding-tp2412550p2412551.html
Looks very hacky but works :).
See the Web Services More example on the JumpStart page. Works for me on Jetty.
The JumpStart page has many "how-to-do-this-in-Tapestry" examples.
I am using the following code to show a page with a Twitter box already filled in with a message:
Click me
However, on the page, I am getting this inside the Twitter box:
myMessage/
Note the trailing slash. Any ideas how to fix this?
We have found a workaround for this, where you add the source=webclient parameter, crucially, to the END of the twitter address. When you do this, Twitter no longer adds the trailing slash. However, given how Twitter like to change their formats and codes around, there's no guarantee this will work forever :-)
For example...
Twitter this
No, the solution is more simple. URL-encode your url :
https://twitter.com/intent/tweet?text=myMessage&url=http%3A%2F%2Fmyurl.com
Add a trailing slash to your URL and that should go away. It worked for me.
Change the URL from this:
http://www.twitter.com/share?url=http://myurl.com&text=myMessage
To this:
http://www.twitter.com/share?url=http://myurl.com/&text=myMessage
As Twitter documentation claims (twitter original reference):
A fully-qualified URL with a HTTP or HTTPS scheme, URL-encoded.
Fully-qualified URL requires to have trailing slash.
From the same documentation:
Example Value: http:%3A%2F%2Fexample.com%2F
Note, that the example has %2F at the end, which is HTML encoded / character. Twitter tries to create correct URL by appending / automatically.
Set your url GET parameter to http://myurl.com/ to get rid of the trailing slash
i am using symfony 1.4.11; use_helper('Url').
On using link_to('new',course/course/type/new),
the url it show is ../backend_dev/backend_dev/Course/course/type/new
instead of
../backend_dev/Course/course/type/new.
Same issue exist for form_tag also.
Edit
Above issue was solved.By setting no_script_name: true at config and clearing cache.
But image_tag(),use_stylesheet() and use_javascript() gives path as for example
use_javascript('jquery-1.6.1.min.js')
==>../web/backend_dev/js/jquery-1.6.1.min.js
instead of
use_javascript('jquery-1.6.1.min.js') ==>../web/js/jquery-1.6.1.min.js
Any help appreciated.
Hard to say without your full routing.yml but the one thing i see is that your internal_uri should be expressed as an abs url with a query string like:
link_to('new','/Course/course?type=new');
Note the forward slash at the beginning. Also the module name should be the real module name, not the routed one so if the maodule is /apps/backend/modules/Course then the module in the internal URI should be Course not course same with the action name.
If the route is named then you should use one of the following:
link_to('new','#routename?type=new');
OR
link_to('new','routename', array('type'=>'new'));