I am attempting to configure Drupal CMIS to connect to the Alfresco public test repository.
I am using this CMIS module
https://www.drupal.org/project/cmis
I am using Alfresco 4.x CMIS Content Repository as found here
https://www.alfresco.com/cmis
The problem is that when i try to browse the repository in drupal I get the following message
There has been an problem contacting the CMIS server, please see the logs.
The error log always reads
HTTP call to [repository link here, shown in code sample bellow] returned [307]. Response: Authentication Required Authentication Required
my Drupal settings file contains the following
$conf['cmis_repositories'] = array(
'default' => array(
'user' => 'admin',
'password' => 'admin',
'url' => 'http://docs.oasis-open.org/ns/cmis/ws/200908/'
)
);
The config is copy/pasted from the modules documentation and includes the URL which appears in the error message. Also I have viewed the $conf global using print('' .print_r($conf,true) . '') so I definitely have settings.php correct.
is my admin, pass, url combination still valid (ie is the site up to date)
what else could be causing this?
Your url seems to be wrong.
Please try with http://cmis.alfresco.com/cmisatom (Atompub ) , http://cmis.alfresco.com/cmisbrowser (json)
Links are there in the alfresco web link mentioned by you
cheers,
Saurav
Related
I am new to Drupal 7 Services (API creation). I read a post from https://www.ostraining.com/blog/drupal/services/
I have installed the required modules and configured all as they said however, I did not integrate any authentication under structure > Services
Thus under Authentication tab, its saying:
No authentication modules are enabled, all requests will be anonymous.
Also, I did not checked the following under "EDIT" tab:
Session authentication
OAuth authentication
However, when I want to access the API through http://localhost/project-name/myrestapi/views/myrestapi
It is saying that ["View myrestapi could not be found"]
Please note, the view is showing the below result from the admin panel:
array (
0 =>
stdClass::__set_state(array(
'title' => 'About Us',
)),
)
May be it was the services_views module(7.x-1.4) I was previously installed. I uninstalled the module and install the previous version of services_views 7.x-1.3. Then I created another view e.g. Rest with another Services and renamed the path (Path:/rest).
Now, I can accessing the path like:
http://localhost/drupal767/myrestapi/views/rest.json?display_id=services_1
http://localhost/drupal767/myrestapi/rest.json
The result looks like:
[{"node_title":"About Us"}]
I have a wordpress website hosted on GoDaddy.
I am an advanced stripe user and have integrated stripe with many Ruby on Rails apps , along with stripe-webhook integration with the Rails. Also i am well versed in how web-hooks work.
But recently i was made owner of a wordpress website hosted on GoDaddy and on that website i am supposed to receive stripe payment failed webhook and then trigger an email based on that webhook event.
I am not able to make much connect with wordpress and stripe from online resources and need help on how to receive stripe-webhooks in wordpress website i.e where to put code to make that happen etc.
I recently had the same problem and pippins stripe integration plugin seemed to answer it but it had a lot of extra code I did not need so I removed it and made a concise version just for the webhook integration: WPStripeWebhook. README is self explanatory. Basically make changes to includes/stripe_listener.php for your events. Also attaching readme here as per stackoverflow guidelines:
Usage:
Copy the complete folder WPStripeWebhook in wp-content/plugins. Go
to website admin page.
Activate the WP Stripe webhook plugin for
plugins section.
After this Settings will start showing Stripe
webhook settings section. Click on it. In the page fill the stripe
keys and check test mode option if you want to test the plugin.
In WPStripeWebhook/includes/stripe_listener.php, make changes for your
event type and email or whatever you want to do in response to
an event. It currently sends out an email.
Important notes and suggestions
For live mode, add stripe webhook endpoint (stripe account -> settings -> account settings -> webhook) like this
https://yourdomain.com?webhook-listener=stripe
For testing locally on your machine, you can use Ultrahook. Its awesome! Set up your keys and username and start ultrahook on your machine using:
ultrahook -k your_ultrahook_key stripe 8888
Add a webhook endpoint url in your stripe account similar to this:
http://stripe.your_ultrahook_username.ultrahook.com/your_wp_website_folder_name/stripe-listener.php?webhook-listener=stripe
And it should start working for you. Also, you might see 404 in ultrahook console. Just ignore it. I would suggest setting up debugging too. It really helps. For debugging, add these to your wp_config.php
define('WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );
define('WP_DEBUG_DISPLAY', false );
#ini_set( 'display_errors', 0 );
define('SCRIPT_DEBUG', true );
After this, you should see a debug.log file in your wp-content folder and it will display errors and warnings and whatever you print using error_log()
Here is my two cents. For posterity and because the accepted answer didn't do it for me.
We can use the WordPress REST api.
By Extending the REST API and Adding Custom Endpoints through the register_rest_route function.
<?php
add_action( 'rest_api_init', 'wpso40015091' );
function wpso40015091() {
$routes = array(
array(
'namespace' => 'wpso40015091/listener/v1',
'route' => 'endpoint',
//www.example.com/index.php/wp-json/wpso40015091/listener/v1/endpoint
//This is the endpoint to add in your Stripe dashboard webhook section.
//From time to time, depending on your host, the "index.php" might be omitted.
//You can use "get_rest_url()" to Retrieves the URL to a REST endpoint on a site.
//https://developer.wordpress.org/reference/functions/get_rest_url/
'args' => array(
'methods' => 'POST',
'callback' => function () {
//...
},
'permission_callback' => '__return_true',
),
'override' => true,
),
);
foreach ( $routes as $route ) {
register_rest_route( $route['namespace'], $route['route'], $route['args'], $route['override'] );
};
};
The callback function is the event listener. Stripe has a built in generator, refer https://stripe.com/docs/webhooks/quickstart.
I am trying to connect contact form 7 with velocify using the Plugin: "Forms: 3rd-Party Integration". Lead created in velocify but no field data import. I have mapped the fields correctly as per the instructions given. Here is the debug message:
SUBMISSION
Array
(
[timeout] => 60
[body] =>
)
RAW RESPONSE
Array
(
[reason] => Could not locate success clause within response
[safe_message] => Success Clause not found
[clause] => done
[response] => <?xml version="1.0" encoding="UTF-8"?><ImportResults><ImportResult refId="" leadId="0" result="Failure" message="No input data was found" /></ImportResults>
)
Please help me out.
This is a strange place to ask this question, as opposed to:
WP stack exchange site
the plugin support forum
the plugin Github issue tracker
That said, as the plugin author I suggest you read the support forum's sticky post: https://wordpress.org/support/topic/its-not-sending-data-help-read-this-first/
Specifically in your case, the debug email tells you the two problems:
You've configured the service to expect the word 'done' in the response, and it's not finding it
It's not finding it because, as the response indicates 'No input data was found' confirming the empty body of the submission.
The second issue (which is the real problem) is probably that you're not mapping it correctly. But without the full debug (or at least the service configuration section of it) I can't tell you why. Look at the "Post (Form)" section to see what's available to map. If you have done it all correctly it may be a compatibility issue -- make sure you're using the latest versions of all relevant plugins, try turning off other unrelated plugins to see if there's some kind of conflict, and finally if you have FTP access turn on WP_DEBUG mode and check the log file.
earlier in 2015 i started creating a website with drupal 7 that imports instagram-content (images, likes, comments etc.) via Drupal Feeds. Everything worked finde, but the projects stopped then.
Now it seems we start that again but suddenly the import is not working anymore. I always get the following error:
{"meta": {"error_type": "OAuthPermissionsException", "code": 400,
"error_message": "This request requires scope=public_content, but this
access token is not authorized with this scope. The user must
re-authorize your application with scope=public_content to be granted
this permissions."}}
I didnt had to send the "public_content" earlier, so i was just sending "basic"-scope access. And as i said, everything worked well.
Now i inserted also the scope for "public_content" along with "basic" within the oauth-Module for feeds. But still getting the error-message above.
Any hints on that?
Thanks in advance and regards,
Fab
This is due to a Instagram Platfrom Update
You'll have to add public_content scope as Joshi has pointed out - and also you'll need to renew your auth token in the settings page.
Then you'll be good to go.
Here is the solution:
Use following code in instagram_social_feed.module
Function: instagram_social_feed_settings()
if (variable_get('instagram_social_feed_client_id', '') != '' && variable_get('instagram_social_feed_redirect_uri', '') != '') {
$form['authenticate'] = array(
'#markup' => l(t('Click here to authenticate via Instagram and create an access token'),
'https://api.instagram.com/oauth/authorize/?client_id=' . variable_get('instagram_social_feed_client_id') . '&redirect_uri=' . variable_get('instagram_social_feed_redirect_uri') . '&response_type=code&scope=public_content'
)
);
}
This will solve the issus
I've split the resources on a WP site into two servers: Server A with administration files, Server B with public files. They are connected by the data base.
Are there any way that will cause media that I upload from the WP admin installation on Server A to be stored over on Server B? Whit this, that media will be served from Server B ("public site").
If possible, other than through an FTP connection, my client doesn't want a FTP in the public site :-(
Thanks in advance!
First, create a remote storage service where you can post the file and return a URL addressing the file on server B. Then you can use wp filters to attain the url from server A.
You can hook into this filter: "wp_handle_upload"
apply_filters{
'wp_handle_upload'
array( 'file' => $new_file, 'url' => $url, 'type' => $type ), 'upload'
)
just replace the URL to the new one