Closed (fixed)
Project:
Web Service Clients
Version:
6.x-2.0-beta3
Component:
Drupal clients
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jul 2011 at 19:19 UTC
Updated:
7 Jun 2013 at 10:30 UTC
When submitting "Add drupal_services_6_2 connection" form
http://testing.abc.lib.fl.us/admin/build/clients/connections/mysite_test
Fatal error: Call to undefined method stdClass::formatEndpoint() in /home/mysite/public_html/testing.mysite.lib.fl.us/sites/all/modules/clients/clients.connection.admin.inc on line
Happens on both master and slave sites configuration.
For endpoint, first entered the URL as shown in help text beneath field; then tried removing the "http://". Same error.
Drupal 6.22
| Comment | File | Size | Author |
|---|---|---|---|
| scr_drupal-connection_editform.jpg | 65.89 KB | greta_drupal |
Comments
Comment #1
greta_drupal commentedIn troubleshooting, I manually removed all rows from the clients_connections table (on both master and slave site). That enabled me to browse to the create connections page. But, when I attempted to recreate afresh through Drupal, again received the error.
Have cleared cache many times.
Comment #2
joachim commentedYour connection is of the wrong class. It should never be a StdClass.
What type is it showing as in the database?
Are you on the latest dev version?
Comment #3
greta_drupal commentedAs noted, I am using Web Service Clients 6.x-2.0-beta3. Per the Content Push instructions :
Showing in which table?
Comment #4
greta_drupal commentedContent Push readme.txt doesn't state needing to install the Transport dev version, so I had installed the alpha, since this will be used on a live site.
I just updated to Transport dev version (from alpha), and I now can add services. Might be good to add that to the readme.txt file.
Comment #5
joachim commentedI don't understand your last comment.
Your formatEndpoint() error is *entirely* to do with Clients module -- nothing else even knows about that function, as it's purely to do with Clients' admin UI.
Also, the dev version of Clients is currently identical to the latest beta, as I've not made any commits since.
Comment #6
greta_drupal commentedI'd have thought as much too. Just reporting what I did.
The only thing that I did related to Clients module was to enable the PEAR Crypt Blowfish option. However, I have since disabled it because it required some additional configuration that I was not sure about -- and, the Content Push (nor Clients) didn't state it as a requirement.
When it was enabled, it was not configured (/admin/settings/crypt_blowfish). Now that it is disabled, it is not ill affecting my ability to create services. Although, I still am not able to properly connect and load node. Still troubleshooting that.
When I try to load a test node (from slave site), I get :
You are saying that stdClass is wrong?
I'm trying to troubleshoot -- trying to figure out where all to look for the issues. Your readme.txt seemed very thorough.
I think Content Push will be an awesome asset, if I can get it working.
Comment #7
greta_drupal commentedIf/when I get this working, I'll create some documentation (use case) with screenshots.
Comment #8
joachim commented> PEAR Crypt Blowfish option
I have *no* idea how that module works btw -- written by the other maintainer.
> You are saying that stdClass is wrong?
Different objects.
The connection should always be a specific class. What you get back from a remote connection is a different kind of thing altogether, so that should be a stdClass.
Comment #9
greta_drupal commentedOk. good to know. Still not sure if that original error, although not displaying, is tell-tale of some of problem that remains.
Right now, Master site can connect with slave site.
But, slave site cannot connect to master site. Neither seems to pass user connect test. Result always reads "Test User".
If I try to test node load on master (yes, i know not the norm) just for troubleshooting, I get this result*:
Master Site:
--------------
Services Key and Connection for receiving (a/k/a slave) site -- key same for both settings.
Key same for connections on both master and slave sites*.
Slave (/Receiving) Site:
---------------------------
Services Key and Connection for master (a/k/a distributing) site -- key same for both settings.
Key same for connections on both master and slave sites*.
Seems that there needs to be a matching key for master and slave (and help text for field seems to indicate that), but I wasn't sure from readme instructions. Only that key created for Services needs to be same used in Connection.
* But, I have tried it both ways. [Master site connects in either case.]
Odd thing:
In the Admin Menu on Master site, the options include:
However, on the receiving site, the Admin Menu options look like this:
I have double checked that all the dependent modules being used for Content Push are same versions on both sites, and same module settings.
I have enabled the same services on both sites, in troubleshooting. So, clones in every way except they have different Content Push names, and unique API keys (with unique domains, urls). Each has the same content types and same webservices role/user. I have checked permissions and even rebuilt them on both sites.
Any ideas where else to look for issues? Uninstalling all content push related modules, reinstalling, and reconfiguring being a last resort.
Comment #10
joachim commented> Services Key and Connection for receiving (a/k/a slave) site. Keys same for both settings.
? That sounds wrong.
> Seems that there needs to be a matching key for master and slave, but I didn't get that from readme instructions. Only that key created for Services needs to be same used in Connection.
Whenever you make a connection, you need a key:
Client ------> Services
specify key --------> Key created by Services
When you connect both ways for content push:
Client -------> Services
specify key --------> Key A created by Services
Services <-------- Client
Key B <----------- specify key
The two keys are completely different!
> If I try to test node load on master (yes, i know not the norm) just for troubleshooting, I get this result:
If you can't connect, then you certainly can't log in, and you certainly can't load a node! These three tests are successively dependent.
Comment #11
joachim commentedO_o we're still on the 'formatEndpoint() error' issue??
Comment #12
greta_drupal commentedwell, I don't know if the error that I received earlier is indicative of some other issue with the clients module, within this installation, that is causing the other failures.
I _did_ try using different keys. And, as mentioned, the master site _is_ connecting, in general...but not logging in.
I am asking how best to continue to troubleshoot. Can you move this thread to Content Push?
Comment #13
joachim commented> I _did_ try using different keys
I don't get this at all. How can you *not* use different keys?
Keys are *created* for you by setting up Services module. You don't get to choose them, so you can't have the same key!
Comment #14
joachim commented> However, on the receiving site, the Admin Menu options look like this:
Clear your caches. Check module version numbers again -- that really should not be happening.
Comment #15
greta_drupal commentedI have double and triple checked versions, and cleared cache several times. Even logged out and logged back in. So, all I can say to that is "Drupal, you go some 'xplainin to do".
But, in any case, I got the connection sorted out! Good test on all.
This is a damn fine functionality (and will make a nice feature)! I have a few other questions that I'll ask at Content Push.
I'll do screenshots for other visual folks who might overlook what I did.
Thanks for all the replies here. Now, I just gotta figure out how it works form here.
Comment #16
socialnicheguru commentedEdit: deleted comment and added it's own issue. Originally I thought it might be related.
I am getting this error and don't know why.
I placed a dsm($connection); before the $rows array and got the following while commenting out the offending line
'endpoint' => $connection->formatEndpoint($connection->endpoint),cid (String, 1 characters ) 2
name (String, 24 characters ) send_to_test_hub2_drupal
type (String, 6 characters ) Normal
endpoint (String, 59 characters ) http://testhub.com/ser...
http://test-hub2-drupal.xxx.com/services/xmlrpc
configuration (Array, 4 elements)
domain (String, 43 characters ) http://testhub.com
servicekey (String, 32 characters ) xxx6a623bdc489e21xxxxxxxxx
username (String, 21 characters ) test-hub2
password (String, 10 characters ) mypassword
table (String, 19 characters ) clients_connections
export_type (Integer) 1
when I goto http://testhub.com/services/xmlrpc
I get this on the page:
XML-RPC server accepts POST requests only.
testhub is the site I want to push content to
Comment #17
joachim commentedCan you file that as a separate bug please?
Comment #18
brettbirschbach commentedgreta_drupal,
I believe your problem is that you are not running the 6.x-1.x-dev version of ctools, but rather you are running the "green lighted" 6.x-1.8 version instead. The 6.x-1.8 version of ctools does not have code to honor the "object factory" setting for the clients_connections schema defined in clients.install.
Updating ctools to the dev version fixed the issue for me.
Comment #19
joachim commentedThat sounds like it could be the problem.
I *think* I specified the dev version of Ctools in the various readmes, but if not, let me know!
Comment #20
socialnicheguru commented#18 solved my problem.
could you add to the docs Ctools: please add versions above 1.8 or dev version later than July 2011.
While yes it did say the Ctools dev version, the explanation above is better and would save others time.
Comment #21
greta_drupal commentedIndeed, I did have the release version of CTools installed before starting with Content Push et al. I did update that to the dev version. That was probably part of the resolution -- i.e., fixing the endpoint error.
Comment #22
greta_drupal commentedYes, I know that keys are automatically generated. I was referring to use of key in the connections configuration. You could use the same key there (same key for master and receiving site) -- that is what I had tried, in troubleshooting, when the other way was not working. [As in a common key that establishes the relationship between the two sites.] ...Just pointing that out for anyone else who might find this thread with same question.
Comment #23
joachim commented> You could use the same key there (same key for master and receiving site) -- that is what I had tried
Er... how? Did you hack them into the DB?
Comment #24
greta_drupal commented???? On the client connections add/edit form, there is a blank for Service Key where you enter the key. Type or copy/paste.
Comment #25
joachim commentedYes, but the Service Key *MUST* match what Services gives you!
Comment #26
joachim commentedClosing very old bugs.