olivierbon / placid Goto Github PK
View Code? Open in Web Editor NEWPlacid is a Craft plugin which makes it easy to consume REST services in your twig templates
Placid is a Craft plugin which makes it easy to consume REST services in your twig templates
Hello,
I'm using Placid 1.4.0 in combination with OAuth 0.9.72. I believe all of my settings are correct for a request that I'm trying to set up, but when I try to make the request in my template, I get the following error:
Argument 1 passed to Dukt\OAuth\base\Provider::setToken() must be an instance of Craft\Oauth_TokenModel, null given, called in /Users/andrew/Repos/Emerge/craft/plugins/placid/services/Placid_RequestsService.php on line 447 and defined
Is there anything off the bat that I should try to fix this?
Thanks,
Andrew Philpott
Any plans to port this for Craft 3 compatibility?
How long is a request cached? It would be very nice to add cache duration as a parameter to the placid.get()
-call.
By the way: I love this plugin! 🍰
When I click to add new request I get this error.
Fatal error: Cannot use object of type Dukt\OAuth\Providers\Instagram as array in /var/www/vhosts/watermark.org/httpdocs/craft/plugins/placid/variables/PlacidVariable.php on line 55
I am running Craft Pro 2.3.2641 & OAuth 0.9.64.
I upgraded to Craft 2.5.2754, ran into an issue that rendered my dashboard unusable, dev mode pointed out that it was caused by Placid.
I then upgraded Placid by deleting the plugin files and replacing them with the latest 67a2ca6
I was prompted to upgrade the database, which succeeded. I am then warned that there were some deprecation errors that I should review.
Clicking that repeats the database upgrade. If I try and use any feature in my Craft Admin Panel I am returned to the database update page for the Placid upgrade. Completing this upgrade makes no difference. All features keep redirecting here.
This is my code:
{% set options = {method : 'POST'} %}
{% set requesten = craft.placid.request('LangEn', options) %}
{% set requestde = craft.placid.request('LangDe', options) %}
These requests have same API URL but different language parameter set in query parameters.
When I turn on caching for both requests, they both return value from first request.
When caching is off, then they return different values.
Setting all parameters either in template or in plugin admin area results in same behaviour.
I am on Placid 1.6.6 and Craft Pro 2.4.2726
Btw, thanks for a great plugin!
I have created an Instagram provider for OAuth and added it in placid. I have made a new Placid request and chosen Instagram from the dropdown for OAuth providers.
However when I make the request, I get an error that it's missing the required access_token.
Am I missing something regarding how this is supposed to be implemented?
It seems you cannot output data when the feed returns just the and not an .
<response>
<id>4</id>
<reference_id>XXXX</reference_id>
<country>United Arab Emirates</country>
<area>Abu Dhabi</area>
</response>
I works when structured as <response><item></item></response>
.
{% set project = craft.placid.request('projects', {
segments: {
feed: 'projects/' ~ projectId ~ '?type=1'
}
}) %}
{% for detail in project.data %}
{{ detail.id }}
{% endfor %}
{{ detail.id }}
does not output anything, but {{ detail }}
outputs the full array.
I am currently trying to access a request in Placid via JS on the front-end.
I structured my AJAX the same as the docs mention:
$.get('{{ actionUrl('placid/requests/request', { handle : 'githubContributor'}) }}', function(response){
console.log(response);
});
In the client console I am getting a 500 Error
On the craft logs I get this error:
exception 'CException' with message 'Craft\Placid_RequestsService and its behaviors do not have a method or closure named "setOptions".' in .../craft/app/framework/base/CComponent.php:266
Is this an issue with the request formatting or an issue with the plug-in?
I'm landing at Google error 400 page when i'm trying to activate my Google OAuth. Here is the message from Google =
400. That’s an error.
Error: invalid_request
Missing required parameter: scope
Request Details >
approval_prompt=auto
scope=
response_type=code
redirect_uri=http://vinyle.dev:8888/index.php/actions/oauth/connect
state=75d37edba37fb8a5896c6eb3ebeca93d
client_id=###here_is_my_client_id###
Really enjoying the ease of use on this, but I'm a bit afraid of what will happen if the news feed I'm ever consuming with it goes down.
From what I've found so far if Placid encounters an API that is throwing a 404, for example, it throws an error that keeps the frontend of the website from rendering (but please tell me if there is a way to more gracefully handle this).
Would love to see some sort of .request object that could be checked for a true / false value, as then I could fail more gracefully and pop up a little error message of "Our news feed could not be loaded at this time" if an API was unavailable.
Is there a config property that allows us to set the cache time for Placid?
Hi. I've had this issue for a while. Basically every month I have to manually log in to Craft and disconnect and reconnect to Facebook. Is there a walk-through anywhere of how to set things up for Facebook so the token auto renews?
Attached are my settings on Craft. Are there settings on https://developers.facebook.com/apps/ I'm perhaps missing?
After some problems with Placid objects returning NULL, my Facebook feed is still not working and returns NULL.
So I thought I'd try to delete the stored Placid request from the control panel to create a new one. But I can't delete any stored requests. Even the Dribble Shots can't be deleted and I get a notification from the Craft GUI which says "Unkown error occurred".
I deleted the log files and made sure what's in it is fresh and relevant to this error. And what I get is the following:
`2015/10/28 12:12:29 [info] [application] $_POST=array (
'id' => '1',
)
$_COOKIE=array (
'6b523ef12eb2a8203cf8d9cbb8807780username' => 'b5725cffc284300cdfdea486429a71f2eb41f34cs:60:"3ba27ee3c067a611cdfdb7dab6d0c558b0bfc518czo3OiJtdXN0YXNqIjs=";',
'CraftSessionId' => '1b590f53b07f03adfebc115b45775fee',
'_ga' => 'GA1.2.209219278.1444302453',
'6b523ef12eb2a8203cf8d9cbb8807780' => 'c818e94ceca2114bc078397388dc110dcff72931s:396:"d3a14965e888d214fdfba0545543f6ae52234aefYTo2OntpOjA7czo3OiJtdXN0YXNqIjtpOjE7czozMjoiSlhiQUNBbHliOG1IajBxfndvVE5oY0J1aUxsTl9uY3IiO2k6MjtzOjM2OiI2NGU0MGI1Mi1jOGY0LTQ2N2ItYjc5My01NmFlNGU3NTJiYWIiO2k6MztpOjA7aTo0O3M6MTIwOiJNb3ppbGxhLzUuMCAoTWFjaW50b3NoOyBJbnRlbCBNYWMgT1MgWCAxMF8xMF8zKSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvNDYuMC4yNDkwLjcxIFNhZmFyaS81MzcuMzYiO2k6NTthOjA6e319";',
)
$_SESSION=array (
'temporary_credentials' => 'O:53:"League\\OAuth1\\Client\\Credentials\\TemporaryCredentials":2:{s:13:"' . "\0" . '*' . "\0" . 'identifier";s:27:"Sp3L0QAAAAAAiQs_AAABUK4Env8";s:9:"' . "\0" . '*' . "\0" . 'secret";s:32:"dVQEVMHyJ67ft3KV5igyACUwioRLPHSI";}',
'token_credentials' => 'O:49:"League\\OAuth1\\Client\\Credentials\\TokenCredentials":2:{s:13:"' . "\0" . '*' . "\0" . 'identifier";s:50:"41125710-BAHyAvmvj46eD2AgGfKw9d1mCTWRZh2JmREJCuxkT";s:9:"' . "\0" . '*' . "\0" . 'secret";s:45:"nRPRghrJmxS2cwMwCydlCUVfzdbezqJV2wPBgMtb2fss5";}',
'6b523ef12eb2a8203cf8d9cbb8807780__id' => '1',
'6b523ef12eb2a8203cf8d9cbb8807780__name' => 'mustasj',
'6b523ef12eb2a8203cf8d9cbb8807780__states' =>
array (
),
'6b523ef12eb2a8203cf8d9cbb8807780__timeout' => 4633278623,
'6b523ef12eb2a8203cf8d9cbb8807780__auth_access' =>
array (
0 => 'uploadToAssetSource:2',
),
'6b523ef12eb2a8203cf8d9cbb8807780__returnUrl' => 'placid',
'facebook.referer' => 'http://bjugn.dev/admin/placid/oauth',
'oauth2state' => '6f07bc062f79143ee35a8c6fcc6b6bb0',
)
$_SERVER=array (
'HTTP_HOST' => 'bjugn.dev',
'HTTP_CONNECTION' => 'keep-alive',
'CONTENT_LENGTH' => '4',
'HTTP_ACCEPT' => '*/*',
'HTTP_ORIGIN' => 'http://bjugn.dev',
'HTTP_X_REQUESTED_WITH' => 'XMLHttpRequest',
'HTTP_USER_AGENT' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36',
'CONTENT_TYPE' => 'application/x-www-form-urlencoded; charset=UTF-8',
'HTTP_REFERER' => 'http://bjugn.dev/admin/placid',
'HTTP_ACCEPT_ENCODING' => 'gzip, deflate',
'HTTP_ACCEPT_LANGUAGE' => 'en-US,en;q=0.8,nb;q=0.6',
'HTTP_COOKIE' => '6b523ef12eb2a8203cf8d9cbb8807780username=b5725cffc284300cdfdea486429a71f2eb41f34cs%3A60%3A%223ba27ee3c067a611cdfdb7dab6d0c558b0bfc518czo3OiJtdXN0YXNqIjs%3D%22%3B; CraftSessionId=1b590f53b07f03adfebc115b45775fee; _ga=GA1.2.209219278.1444302453; 6b523ef12eb2a8203cf8d9cbb8807780=c818e94ceca2114bc078397388dc110dcff72931s%3A396%3A%22d3a14965e888d214fdfba0545543f6ae52234aefYTo2OntpOjA7czo3OiJtdXN0YXNqIjtpOjE7czozMjoiSlhiQUNBbHliOG1IajBxfndvVE5oY0J1aUxsTl9uY3IiO2k6MjtzOjM2OiI2NGU0MGI1Mi1jOGY0LTQ2N2ItYjc5My01NmFlNGU3NTJiYWIiO2k6MztpOjA7aTo0O3M6MTIwOiJNb3ppbGxhLzUuMCAoTWFjaW50b3NoOyBJbnRlbCBNYWMgT1MgWCAxMF8xMF8zKSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvNDYuMC4yNDkwLjcxIFNhZmFyaS81MzcuMzYiO2k6NTthOjA6e319%22%3B',
'PATH' => '/usr/bin:/bin:/usr/sbin:/sbin',
'SERVER_SIGNATURE' => '',
'SERVER_SOFTWARE' => 'Apache',
'SERVER_NAME' => 'bjugn.dev',
'SERVER_ADDR' => '::1',
'SERVER_PORT' => '80',
'REMOTE_ADDR' => '::1',
'DOCUMENT_ROOT' => '/Users/mustasj/Documents/git/bjugn.no/www',
'SERVER_ADMIN' => '[email protected]',
'SCRIPT_FILENAME' => '/Users/mustasj/Documents/git/bjugn.no/www/index.php',
'REMOTE_PORT' => '59764',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'REQUEST_METHOD' => 'POST',
'QUERY_STRING' => '',
'REQUEST_URI' => '/index.php/admin/actions/placid/requests/deleteRequest',
'SCRIPT_NAME' => '/index.php',
'PATH_INFO' => '/admin/actions/placid/requests/deleteRequest',
'PATH_TRANSLATED' => 'redirect:/index.php/actions/placid/requests/deleteRequest',
'PHP_SELF' => '/index.php/admin/actions/placid/requests/deleteRequest',
'REQUEST_TIME_FLOAT' => 1446034349.15100002288818359375,
'REQUEST_TIME' => 1446034349,
'argv' =>
array (
),
'argc' => 0,
)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "log" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (124)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/bootstrap.php (189)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "coreMessages" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (127)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/bootstrap.php (189)
2015/10/28 12:12:29 [trace] [system.db.CDbConnection] Opening DB connection
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/behaviors/AppBehavior.php (824)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (580)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/behaviors/AppBehavior.php (80)
2015/10/28 12:12:29 [trace] [system.db.CDbCommand] Querying SQL: SHOW TABLES LIKE 'craft_%'
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/db/schemas/MysqlSchema.php (295)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/db/DbConnection.php (90)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/behaviors/AppBehavior.php (98)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] begin:system.db.CDbCommand.query(SHOW TABLES LIKE 'craft_%')
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] end:system.db.CDbCommand.query(SHOW TABLES LIKE 'craft_%')
2015/10/28 12:12:29 [trace] [system.db.CDbCommand] Querying SQL: SELECT *
FROM `craft_info` LIMIT 1
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/behaviors/AppBehavior.php (492)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/behaviors/AppBehavior.php (187)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (719)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] begin:system.db.CDbCommand.query(SELECT *
FROM `craft_info` LIMIT 1)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] end:system.db.CDbCommand.query(SELECT *
FROM `craft_info` LIMIT 1)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "userSession" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (158)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/index.php (62)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "security" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/CookieCollection.php (41)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/HttpRequestService.php (882)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "statePersister" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/CookieCollection.php (41)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/HttpRequestService.php (882)
2015/10/28 12:12:29 [trace] [system.caching.Craft\FileCache] Serving "Yii.CStatePersister./Users/mustasj/Documents/git/bjugn.no/craft/storage/runtime/state/state.bin" from cache
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/CacheService.php (169)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/CookieCollection.php (41)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/HttpRequestService.php (882)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "httpSession" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (477)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/UserSessionService.php (92)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "session" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/UserSessionService.php (1087)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/UserSessionService.php (376)
2015/10/28 12:12:29 [trace] [system.db.CDbCommand] Querying SQL: SELECT *
FROM `craft_users`
WHERE id=:id. Bound with :id='1'
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/UserSessionService.php (1535)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/UserSessionService.php (376)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/UserSessionService.php (841)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] begin:system.db.CDbCommand.query(SELECT *
FROM `craft_users`
WHERE id=:id. Bound with :id='1')
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] end:system.db.CDbCommand.query(SELECT *
FROM `craft_users`
WHERE id=:id. Bound with :id='1')
2015/10/28 12:12:29 [trace] [system.CModule] Loading "securityManager" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/UserSessionService.php (1272)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/UserSessionService.php (92)
2015/10/28 12:12:29 [trace] [system.caching.Craft\FileCache] Serving "appPath" from cache
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/CacheService.php (169)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (836)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (203)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "updates" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (206)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/index.php (62)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "plugins" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (246)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/index.php (62)
2015/10/28 12:12:29 [trace] [system.db.CDbCommand] Querying SQL: SELECT `id`, `class`, `version`, `settings`, `installDate`
FROM `craft_plugins`
WHERE enabled=1
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/PluginsService.php (102)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (246)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/index.php (62)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] begin:system.db.CDbCommand.query(SELECT `id`, `class`, `version`, `settings`, `installDate`
FROM `craft_plugins`
WHERE enabled=1)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] end:system.db.CDbCommand.query(SELECT `id`, `class`, `version`, `settings`, `installDate`
FROM `craft_plugins`
WHERE enabled=1)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "messages" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/Craft.php (382)
in /Users/mustasj/Documents/git/bjugn.no/plugins/obsoleteredirect/ObsoleteRedirectPlugin.php (9)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "i18n" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/behaviors/AppBehavior.php (737)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/behaviors/AppBehavior.php (570)
2015/10/28 12:12:29 [trace] [system.db.CDbCommand] Querying SQL: SELECT `locale`
FROM `craft_locales`
ORDER BY `sortOrder`
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/LocalizationService.php (126)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/LocalizationService.php (173)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/behaviors/AppBehavior.php (737)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] begin:system.db.CDbCommand.query(SELECT `locale`
FROM `craft_locales`
ORDER BY `sortOrder`)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] end:system.db.CDbCommand.query(SELECT `locale`
FROM `craft_locales`
ORDER BY `sortOrder`)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "templates" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/plugins/guano/GuanoPlugin.php (40)
in /Users/mustasj/Documents/git/bjugn.no/plugins/guano/GuanoPlugin.php (11)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "resources" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/helpers/UrlHelper.php (250)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/TemplatesService.php (429)
2015/10/28 12:12:29 [trace] [system.caching.Craft\FileCache] Serving "resourcePath:guano/css/guano.css" from cache
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/CacheService.php (169)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/ResourcesService.php (41)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/helpers/UrlHelper.php (254)
2015/10/28 12:12:29 [trace] [system.caching.Craft\FileCache] Serving "resourcePath:guano/js/guano.js" from cache
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/CacheService.php (169)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/ResourcesService.php (41)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/helpers/UrlHelper.php (254)
2015/10/28 12:12:29 [trace] [system.caching.Craft\FileCache] Serving "resourcePath:utilsme/css/utilsMe.css" from cache
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/CacheService.php (169)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/ResourcesService.php (41)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/helpers/UrlHelper.php (254)
2015/10/28 12:12:29 [trace] [system.caching.Craft\FileCache] Serving "resourcePath:utilsme/js/utilsMe.js" from cache
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/CacheService.php (169)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/ResourcesService.php (41)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/helpers/UrlHelper.php (254)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "urlManager" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/controllers/BaseController.php (50)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (784)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "placid_requests" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/controllers/Placid_RequestsController.php (99)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (784)
2015/10/28 12:12:29 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `craft_placid_requests`
in /Users/mustasj/Documents/git/bjugn.no/craft/app/records/BaseRecord.php (49)
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/services/Placid_RequestsService.php (40)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] begin:system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `craft_placid_requests`)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] end:system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `craft_placid_requests`)
2015/10/28 12:12:29 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `craft_placid_requests`
in /Users/mustasj/Documents/git/bjugn.no/craft/app/records/BaseRecord.php (49)
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/services/Placid_RequestsService.php (40)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] begin:system.db.CDbCommand.query(SHOW CREATE TABLE `craft_placid_requests`)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] end:system.db.CDbCommand.query(SHOW CREATE TABLE `craft_placid_requests`)
2015/10/28 12:12:29 [trace] [system.db.ar.CActiveRecord] Craft\Placid_RequestsRecord.findByPk()
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/services/Placid_RequestsService.php (515)
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/services/Placid_RequestsService.php (277)
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/controllers/Placid_RequestsController.php (99)
2015/10/28 12:12:29 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `craft_placid_requests` `t` WHERE `t`.`id`=1 LIMIT 1
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/services/Placid_RequestsService.php (515)
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/services/Placid_RequestsService.php (277)
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/controllers/Placid_RequestsController.php (99)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] begin:system.db.CDbCommand.query(SELECT * FROM `craft_placid_requests` `t` WHERE `t`.`id`=1 LIMIT 1)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] end:system.db.CDbCommand.query(SELECT * FROM `craft_placid_requests` `t` WHERE `t`.`id`=1 LIMIT 1)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "dashboard" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/services/Placid_RequestsService.php (517)
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/services/Placid_RequestsService.php (277)
2015/10/28 12:12:29 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `craft_widgets`
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/DashboardService.php (332)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/DashboardService.php (332)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/DashboardService.php (62)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] begin:system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `craft_widgets`)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] end:system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `craft_widgets`)
2015/10/28 12:12:29 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `craft_widgets`
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/DashboardService.php (332)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/DashboardService.php (332)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/DashboardService.php (62)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] begin:system.db.CDbCommand.query(SHOW CREATE TABLE `craft_widgets`)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] end:system.db.CDbCommand.query(SHOW CREATE TABLE `craft_widgets`)
2015/10/28 12:12:29 [trace] [system.db.ar.CActiveRecord] Craft\WidgetRecord.findAllByAttributes()
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/DashboardService.php (334)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/DashboardService.php (62)
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/services/Placid_RequestsService.php (517)
2015/10/28 12:12:29 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `craft_widgets` `t` WHERE `t`.`userId`=:yp0 ORDER BY sortOrder. Bound with :yp0='1'
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/DashboardService.php (334)
in /Users/mustasj/Documents/git/bjugn.no/craft/app/services/DashboardService.php (62)
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/services/Placid_RequestsService.php (517)
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] begin:system.db.CDbCommand.query(SELECT * FROM `craft_widgets` `t` WHERE `t`.`userId`=:yp0 ORDER BY sortOrder. Bound with :yp0='1')
2015/10/28 12:12:29 [profile] [system.db.CDbCommand.query] end:system.db.CDbCommand.query(SELECT * FROM `craft_widgets` `t` WHERE `t`.`userId`=:yp0 ORDER BY sortOrder. Bound with :yp0='1')
2015/10/28 12:12:29 [error] [php] array_key_exists() expects parameter 2 to be array, null given (/Users/mustasj/Documents/git/bjugn.no/plugins/placid/services/Placid_RequestsService.php:522)
Stack trace:
#0 /Users/mustasj/Documents/git/bjugn.no/plugins/placid/controllers/Placid_RequestsController.php(99): Craft\Placid_RequestsService->deleteRecordById()
#1 /Users/mustasj/Documents/git/bjugn.no/craft/app/framework/web/actions/CInlineAction.php(49): Craft\Placid_RequestsController->actionDeleteRequest()
#2 /Users/mustasj/Documents/git/bjugn.no/craft/app/framework/web/CController.php(308): CInlineAction->runWithParams()
#3 /Users/mustasj/Documents/git/bjugn.no/craft/app/framework/web/CController.php(286): Craft\Placid_RequestsController->runAction()
#4 /Users/mustasj/Documents/git/bjugn.no/craft/app/framework/web/CController.php(265): Craft\Placid_RequestsController->runActionWithFilters()
#5 /Users/mustasj/Documents/git/bjugn.no/craft/app/framework/web/CWebApplication.php(282): Craft\Placid_RequestsController->run()
#6 /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php(784): Craft\WebApp->runController()
#7 /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php(276): Craft\WebApp->_processActionRequest()
#8 /Users/mustasj/Documents/git/bjugn.no/craft/app/framework/base/CApplication.php(184): Craft\WebApp->processRequest()
#9 /Users/mustasj/Documents/git/bjugn.no/craft/app/index.php(62): Craft\WebApp->run()
#10 /Users/mustasj/Documents/git/bjugn.no/www/index.php(26): require_once()
REQUEST_URI=/index.php/admin/actions/placid/requests/deleteRequest
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/services/Placid_RequestsService.php (522)
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/services/Placid_RequestsService.php (277)
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/controllers/Placid_RequestsController.php (99)
2015/10/28 12:12:29 [trace] [system.CModule] Loading "errorHandler" application component
in /Users/mustasj/Documents/git/bjugn.no/craft/app/etc/web/WebApp.php (584)
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/services/Placid_RequestsService.php (522)
in /Users/mustasj/Documents/git/bjugn.no/plugins/placid/services/Placid_RequestsService.php (277)
******************************************************************************************************
I'm not sure if this is related to my initial problem with the Facebook feed returning NULL, but I can't get to the bottom of it unless I try to remove the request and create a new one
Edit: I tried to uninstall Placid alltogether and install it again. And the same thing happens when trying to delete the built inn Dribble Shots request
Two questions. How do I check to see if Placid is available/installed? How do I make a Placid call from a plugin?
So here I am again with this issue. I noticed that all of a sudden, the facebook posts didn't appear as they used to. And after debugging a bit, I found that the facebook placid object was NULL. So I checked the placid.log and found it got a 400 Bad Request response.
I then copied the URL it tries to collect from and got this response from Facebook Graph:
"Error validating access token: Session has expired on Sunday, 27-Dec-15 02:10:15 PST. The current time is Monday, 04-Jan-16 04:59:02 PST."
How can I make sure it creates a new token? I tried disabling all caching in Craft. And even flushing everything as well. But no dice.
Does Placid make use of an api's http cache control & etag params returned in the http headers?
I couldn't work out an easy way to restrict it to only getting or showing only the last 5 items from a feed.
I had expected the following to work from looking at other code examples around:
{% set events = craft.placid.request('EventsFeed').limit(5) %}
I'm new to craft, so the only way I managed it was by wrapping the output in an iF loop in the template:
{% if loop.index <= 5 %} display t items {% endif %}
Is there a better way?
Could/should there be a limit option in the settings panel?
I'm using Placid to set up a twitter and facebook feed. Which has been working nicely.
However, the Facebook feed suddenly started to return NULL from the placid.request object.
So I updated Placid to the latest version and now the Twitter feed returns NULL as well.
What could be the problem? Both Placid and OAuth is the latest versions (placid: 1.6.2, OAth: 0.9.73)
I upgraded to the latest version of Placid and got a template error for a widget I had created with a Placid request.
Widget looks like this (worked prior to update) and pulls jobs from a job site:
<table class="data fullwidth">
<tbody>
{% for job in response.jobs %}
<tr>
<td>
<span class="light">Greenhouse Job ID: {{ job.id }}</span><br>
{{ job.title }} - <a href="{{ siteUrl }}careers/{{ job.id }}" target="_blank">View Job</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
After update I get this error: Method "jobs" for object "Guzzle\Http\Message\Response" does not exist
. I dumped the {{ response }}
object and can see it's a Guzzle response object but it doesn't contain any data from my Placid request.
How can I get this working again?
Thanks for sharing this plugin–it's awesome. I just came across a bug as I was wondering why I kept getting a 401
status code. It seems storing the authorization string in Placid > Basic Auth > Access tokens and linking that token to a request does not work.
So I had to move the authorization header to the Placid request headers table to get it to work. Is this not a bug and I am totally missing the intended user for basic auth tokens?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.