Closed (fixed)
Project:
Web Widgets
Version:
6.x-1.0-beta1
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Jun 2009 at 13:27 UTC
Updated:
8 Nov 2012 at 10:34 UTC
Jump to comment: Most recent file
Comments
Comment #1
G Gavitt commentedI am getting the exact same thing. The % is encoded rather then being replaced by the argument.
Comment #2
G Gavitt commentedI have quick and really dirty work around..this will only work if your on the page of the view...
on line 259 of web_widgets_plugin_display_web_widgets.inc
change
$path = url($this->view->display[$this->display->id]->display_options['path'], array('absolute' => TRUE));to
$path = $base_url . request_uri();(function from http://api.drupal.org/api/function/request_uri/6 )
and use global $base_url; right below the function around line 256
That will assign the current url..(which is the page of your view with the argument) to the embed code that is generated. However..you will always see the embed code on that page on outside embeds...because I am pretty sure the module is supposed to generate a view with-out its own embed code widget and by changing that line, you will bypass the link to that view.
As a work around for that...
You can append $path = $base_url . request_uri(); with something like $path = $base_url . request_uri() . "/embed" ;
Then you can make a new view using the same path as the original embedded one but add the /embed to the end of the path. Then you can theme that page anyway you want.. even take over the whole page with a page tpl from the path like page-examplefolder-examplefolder-embed.tpl.php and that will also pass the argument.
Comment #3
G Gavitt commentedI just started working on a better fix for this..
In the web_widgets_module add
Then in web_widgets_plugin_display_web_widgets.inc
Replace
$path = url($this->view->display[$this->display->id]->display_options['path'], array('absolute' => TRUE));With
That will replace the %25 with the value of the view argument. Only works for the first argument so far but I am pretty sure the replace function could be re-written to replace all the %25's with their proper views argument. Also I dont think it plays well with an empty argument yet..it will probably? pass // in replacement of the null value.
Comment #4
aron novakWell, thank you guys for making clear what was wrong here. Can you test if the patch below works fine?
Comment #5
G Gavitt commentedWorks great for me so far. Thank you aron.
Comment #6
alex_b commentedI'm pretty sure there is a views API function to build this URL.
Comment #7
aron novakAttached a patch that uses views api.
Comment #8
aron novakComment #10
jmonster commentedI am using the above following code for getting the base path $path = $base_url . request_uri();
This is a very novice question, but after using this code, i end up with the tail of the url eg /taxonomy/term/24 and the mysite.com/ part is cut off
Is there any way to make it show the entire url? i have struggled with this for a while now and always struggle when it come to path related problems, but am sure its very easy. Can anyone show me the light?
Comment #11
clemens.tolboomThis issue was fixed and the report from #10 is an old support question. Feel free to create a new support request issue.