Project:Remote blocks
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Yorirou
Status:needs review

Issue Summary

I'm trying to follow your blog. I'm on the admin/content/remoteblocks/add page after enabling the server.

I see the url field, and a required module label without the field. I'm not sure what to put into the url field.

I put in my site url, it says:
Module field is required.
Invalid server

Thanks.

Comments

#1

What 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).

#2

Ahh, 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!

#3

Do you have adblock or any other javascript blocker installed?
I developed it with Chromium and Firefox 3.6 with Firebug installed.

#4

Yes, I don't have anything like that. :(

#5

I 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."

#6

I 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

#7

Status:active» needs review

I have just committed a proposed fix to CVS.

#8

Component:Documentation» Code
Category:support request» bug report
Assigned to:Anonymous» Yorirou

#9

Thanks 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!

#10

This 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?

#11

I'm using Windows Vista Firefox 3.6/Chrome 4.

Thanks a lot!

#12

This UI seems pretty much broken.

Nothing happens when I put in a URL and move focus.

And anyway, this is not good UI design!

#13

Status:needs review» active

In 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.

#14

Priority:normal» critical

FWIW I've just hacked out the JS in my copy.

Upping to critical, as the module doesn't work otherwise.

#15

I'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.

#16

I am also getting the same error.

#17

Hi,

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.

#18

> Do you mind sharing your hacked version?

Just comment out the drupal_add_js() line ;)

#19

Thanks.

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

#20

When 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)

#21

Which I am doing but its not working. Its always invalid server. What else am I missing?

#22

Enable the server on the other site?

#23

The 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

Type page not found
Date 5:48am Oct 11 2010
User Anonymous
Location http://127.0.0.1/xxxxxxx/_/xxxxxxx//remoteblocks
Referrer

Message remoteblocks
Severity warning
Hostname 127.0.0.1
Operations

Thanks.

Kahenya

AttachmentSize
Remote blocks_1286809517770.png 9.91 KB

#24

> 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!

#25

Ok. 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

#26

My proposed fix: cut out the JS and change the form to a multistep one. What do you think about it?

#27

Which is cool. But honestly, I have no clue how to go about that.

#28

> 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.

#29

Joachim 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

#30

Status:active» needs review

I 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.

#31

Sweet. 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

#32

Scratch that, it is able to fetch the list of modules, but still brings up the whole Invalid Server business when I try save.

Sorry.

#33

I 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.

#34

I 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.

nobody click here