Needs review
Project:
Remote blocks
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
4 Feb 2010 at 03:33 UTC
Updated:
24 Jun 2011 at 05:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tamasd commentedWhat you have to put in the url field is the url of the site where the remoteblocks server is enabled. After the URL field loses the focus (you click somewhere else), it sends a request to the remote site, and asks for the list of blocks. After that is creates two select boxes and populates them with the data (as you can see on the screenshots).
Comment #2
Flying Drupalist commentedAhh, thanks for the help.
The module and delta fields were not populated after blur.
I used the contact form on d.o to send you the response on site.com//remoteblocks.
Thanks again!
Comment #3
tamasd commentedDo you have adblock or any other javascript blocker installed?
I developed it with Chromium and Firefox 3.6 with Firebug installed.
Comment #4
Flying Drupalist commentedYes, I don't have anything like that. :(
Comment #5
domesticat commentedI can confirm this issue.
In Firefox 3.5.7, when I try to add a URL, the page does not change onblur. Only option is to click 'create' and that gets the "Module field is required" error.
In IE 7 on page load I see a momentary FOUC (flash of unstyled content) and I can tell that there is a textfield hidden for the Module section. When I type in a URL and try to shift focus, I do get a warning that says "This page is accessing information that is not under its control. This poses a security risk. Do you want to continue?"
If I click yes, nothing changes. Fields aren't populated. I am getting a javascript error on line 1294, character 7: "object doesn't support this property or method."
Comment #6
tamasd commentedI had some time to play around:
Unaffedted:
- Linux, Chromium 5
- Linux, Firefox 3.6 Firebug installed
Affected:
- Linux, Opera 10.10
- Windows XP SP3, Firefox 3.6 No extensions installed
- Windows XP SP3, Google Chrome
Comment #7
tamasd commentedI have just committed a proposed fix to CVS.
Comment #8
tamasd commentedComment #9
Flying Drupalist commentedThanks for your support!
The response starts like this:
jsonp1266130305033({"type":"error","code":400,"message":"Invalid arguments"
I still don't get a modules field created. Thanks!
Comment #10
tamasd commentedThis error message is correct, because you aren't submitting module name and delta, so the server sends back an error message with the available modules and deltas. This is the expected behavior. The jsonp thing is there, because I modified the code to use jsonp.
What is your setup? What kind of OS/browser?
Comment #11
Flying Drupalist commentedI'm using Windows Vista Firefox 3.6/Chrome 4.
Thanks a lot!
Comment #12
joachim commentedThis UI seems pretty much broken.
Nothing happens when I put in a URL and move focus.
And anyway, this is not good UI design!
Comment #13
joachim commentedIn fact, the more I think about it -- using AJAX to load up UI form a remote site, which is going to be a slow process -- is a big UI nono. This needs removing or changing.
Comment #14
joachim commentedFWIW I've just hacked out the JS in my copy.
Upping to critical, as the module doesn't work otherwise.
Comment #15
T-34 commentedI'm enable server at "general" tab on two sites. When I add url, see
* Module field is required.
* Invalid server
server for both sites active.
Comment #16
himangshu.dutta19 commentedI am also getting the same error.
Comment #17
Anonymous (not verified) commentedHi,
Do you mind sharing your hacked version? Or rather, can anyone help me get this module to work? I'm on Firefox on a Linux machine and I have tried every known browser on this machine and none do anything. Can anyone help?
Thanks.
Comment #18
joachim commented> Do you mind sharing your hacked version?
Just comment out the drupal_add_js() line ;)
Comment #19
Anonymous (not verified) commentedThanks.
OK. Did so, and now the invalid server thing still comes up. Let me be a bother again and ask you for a quick cheat sheet with a few details, like what to put in the module part since its not automagically selected for you and why the invalid server is. Possible quick walkthrough?
Appreciated
Comment #20
joachim commentedWhen you add a block put in:
URL: http://example.com/'
Module: the module of the block
Delta: the delta of the block (check its CSS ID to figure this out)
Comment #21
Anonymous (not verified) commentedWhich I am doing but its not working. Its always invalid server. What else am I missing?
Comment #22
joachim commentedEnable the server on the other site?
Comment #23
Anonymous (not verified) commentedThe server is enabled.
This is my process.
1. Installed the module on the site as usual. All modules accompanying this are enabled.
2. Enabled the server on the site (host) and the site (remote) so both of them have the server enabled.
3. Clicked on Add and put in the URL of the remote site with a trailing slash. The place it says enable block is left blank since I am expecting it to do a "fetch" of the modules list and have a list with which i can then select. Where it says delta, I leave blank but there is a "0" on it.
4. Clicked on create and get the error message in the attached PNG.
Anywhere I'm going wrong?
Also noted in Watchdog
Thanks.
Kahenya
Comment #24
joachim commented> The place it says enable block is left blank since I am expecting it to do a "fetch" of the modules list and have a list with which i can then select. Where it says delta, I leave blank but there is a "0" on it.
Well no, since you turned off the JS!!!
> so both of them have the server enabled.
Er, only on the server!
Comment #25
Anonymous (not verified) commentedOk. I have switched off the server on the host then in the module part I put in the name of the module, in this case the invite module.
Layout as follows
URL: http://127.0.0.1/
Module: Invite
Delta: 0
The response on this is Invalid Server.
What is the format I should follow?
Thanks
Comment #26
tamasd commentedMy proposed fix: cut out the JS and change the form to a multistep one. What do you think about it?
Comment #27
Anonymous (not verified) commentedWhich is cool. But honestly, I have no clue how to go about that.
Comment #28
joachim commented> My proposed fix: cut out the JS and change the form to a multistep one. What do you think about it?
Take a look at how I did that in Content Distribution module -- that lets you choose a view, then a display, then arguments. The principle is the same, though IIRC it's not actually a multistep form, just one tab after another.
Comment #29
Anonymous (not verified) commentedJoachim and Yorirou
I'm checking the Content Distribution Module. Looks quite interesting, but I still find troubles. You guys are on a very deep tech level and I'm not quite there. All I have been trying to do is to get the module to work, and not quite getting it right. Now, I'm not even quite sure what I am doing next.
Is there a step to step model of hacking, an implementing. When I get a moment after the project is done, will go to code level, but unfortunately, I need a quick way of getting this to work.
I will cut and delete whatever I need to, but I am absolutely lost on what to do right now.
Thanks.
Kahenya
Comment #30
tamasd commentedI have found the bug in the JS ui, and I have fixed it.
Give it a try: if it works, then I'll mark this issue as resolved, if it doesn't, then I'll rewrite it to a multistep form.
Comment #31
Anonymous (not verified) commentedSweet. It works, but you need to put this in a multistep at some point. The javascript is cool, but as I learnt from Google. only when absolutely necessary. That would be the best thing to do, I think. Anyway, appreciated very much. Has solved a lot of problems for me.
I can't close this as I did not initiate it, but it worked for me.
Kahenya
Comment #32
Anonymous (not verified) commentedScratch that, it is able to fetch the list of modules, but still brings up the whole Invalid Server business when I try save.
Sorry.
Comment #33
sheazo commentedI seem to be having the same issue as Kahenya -- I enter a URL and name, the module and delta fields are populated, I select the desired options, hit save, and get an "invalid server" error each time. This happens whether trying to load from a remote server or my localhost. Both are "server enabled" at the moment, so that is not the issue.
Any progress on this or any recommendations on how to get it working? It's the perfect solution for a problem I'm trying to solve at the moment and would love to be able to implement it.
Thanks.
Comment #34
hhg commentedI got the same issue: "Invalid server".
After reading the source I realised I had forgot to set the permissions on the server side:
remoteblocks modul
access remote blocks
I added that permission to the anonymous user, and then it worked.