Giter Club home page Giter Club logo

videos's People

Contributors

benjamindavid avatar dependabot[bot] avatar jamesmacwhite avatar jaspertandy avatar tylerbrostrom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

videos's Issues

cacheDuration is broken - Caching issues

In /src/services/Cache.php

$expire = VideosPlugin::$plugin->getSettings()->cacheDuration;
$expire = new DateInterval($expire);
$expire = $expire->format('%s');

This code always returns 0 as it doesn't return the total amount of seconds and only the seconds that are set for that DateInterval. It should be updated to use the Craft helper to return the total amount of seconds.

$expire = VideosPlugin::$plugin->getSettings()->cacheDuration;
$expire = new DateInterval($expire);
$expire = \craft\helpers\DateTimeHelper::intervalToSeconds($expire);

Also, it seems that videos are hard coded to always cache for an hour. This is not efficient on sites that show lots of videos. Therefore I would either allow for another "setting" to override this, or just apply the above caching time to all calls by removing the "if (!$expire) {" around the above code.

Thanks.

Missing Images causes internal server error on CP

Description

Today a client contacted me about this error message:

yii\base\ErrorException: finfo_file(/home/web1/files/craft3/storage/runtime/videos/thumbnails/vimeo/506060813/original/1047228878_1280.jpg): failed to open stream: No such file or directory in /home/web1/files/craft3/vendor/yiisoft/yii2/helpers/BaseFileHelper.php:167
Stack trace:

I cleared the cache, expecting the plugin to regenerate the previews. But this did not happen. In contrast: Now every page containing a video is not editable anymore and presents with an Internal Server Error.

This makes a large portion of the site unusable for the client which is very annoying.

Could you please fix this ASAP or provide me with some information how to solve this issue?

Additional info

  • Plugin version: 2.0.12
  • Craft version: 3.6.2
  • PHP version: 7.3.26
  • Database driver & version: MySQL 5.7.22
  • php error log is empty

`Cannot use dukt\videos\Plugin as Videos because the name is already in use`

Happening when trying to add a video to a video field type or saving an entry with a video field type. Have setup oAuth and authenticated with Vimeo.

Running Craft 3.0.0-RC5. Tried deleting vendor directory and re-running composer install with no luck. This error is only happening on one local Craft 3 build, on another running the same PHP version (7.1.8) its fine.

screen shot 2018-01-16 at 12 46 50

Cannot use dukt\videos\Plugin as Videos because the name is already in use
1. in /Users/DaveWood/Sites/2017/quinine/deploy/vendor/dukt/videos/src/services/Cache.php at line 11
234567891011121314151617181920/**
 * @link      https://dukt.net/craft/videos/
 * @copyright Copyright (c) 2017, Dukt
 * @license   https://dukt.net/craft/videos/docs/license
 */
 
namespace dukt\videos\services;
 
use Craft;
use dukt\videos\Plugin as Videos;
use yii\base\Component;
use DateInterval;
 
/**
 * Class Cache service.
 *
 * An instance of the Cache service is globally accessible via [[Plugin::cache `Videos::$plugin->getCache()`]].
 *
 * @author Dukt <[email protected]>
2. yii\base\ErrorHandler::handleFatalError()
$_GET = [
    'p' => 'admin/entries/site/19-strategic-thinking',
];

$_COOKIE = [
    'gvc' => '924vr2635551464203197',
    '1031b8c41dfff97a311a7ac99863bdc5_username' => 'e50f964204ce5c98cec1559a96beb3b7a3cf6f4c6ab6c721a1804f33e33198f3a:2:{i:0;s:41:"1031b8c41dfff97a311a7ac99863bdc5_username";i:1;s:5:"admin";}',
    'CraftSessionId' => '1d83e53ad424ef3a96f9a39cd5822d42',
    '1031b8c41dfff97a311a7ac99863bdc5_identity' => 'bc1188a2902058f11ad3b6c630e79a31b847b5a60337229097fa852bcf27382aa:2:{i:0;s:41:"1031b8c41dfff97a311a7ac99863bdc5_identity";i:1;s:286:"["1","[\\"0ba3yS2cf0PZwtwwdmhPCvL9XCqQBE2qRUCrwhiwa4wXDRNGnj0mhDkioSw2-_3rXSwpu9F7a3yrL7PRn7H2vGayWO_zedqe5Z16\\",\\"94991a2b-e6f6-454b-88d7-65c00e0d02f1\\",\\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36\\"]",3600]";}',
    'CRAFT_CSRF_TOKEN' => '1b1d9ac5e1aaca8a34f05c3bcd2a7cfc0b8420b5a179564d0c08d022cbc75217a:2:{i:0;s:16:"CRAFT_CSRF_TOKEN";i:1;s:208:"2kjUNLbCtPLq63FAKApu3DvOnOyCtRwQwDlsybVN|264cd2d66da118c89d69f0ccca15e128cb61c97947250576f53d12c6711f9fee2kjUNLbCtPLq63FAKApu3DvOnOyCtRwQwDlsybVN|1|$2y$13$pRclGeJB01Jvz4KIEcyoVuWurQHF39dslaGK88aJx3GCCQy9xLdCq";}',
];

$_SESSION = [
    'bd62416aa8538ede709019a5e113eea5__flash' => [],
    '1031b8c41dfff97a311a7ac99863bdc5__id' => '1',
    '1031b8c41dfff97a311a7ac99863bdc5__expire' => 1516110374,
    'enableDebugToolbarForSite' => true,
    'bd62416aa8538ede709019a5e113eea5__auth_access' => [
        'editStructure:1',
        'saveAssetInVolume:5',
        'saveAssetInVolume:1',
        'saveAssetInVolume:8',
        'saveAssetInVolume:9',
        'saveAssetInVolume:3',
    ],
    'videos.oauthGateway' => 'vimeo',
    'videos.oauthState' => null,
];
Yii Framework
2018-01-16, 12:46:17

Apache

Yii Framework/2.0.13.1

Implement oauthProviderOptions settings as Environmental Settings

Description

Currently, projects utilizing Project Config will plainly store the values of oauthProviderOptions->vimeo->clientId and other sensitive settings in project.yaml.

To prevent the possibility of exposing these sensitive values in version control, this issue requests that sensitive settings be implemented as Environmental Settings.

Current config file (exposes values to project.yaml)

<?php

return [
    'oauthProviderOptions' => [
        'vimeo' => [
            'clientId' => getenv('VIMEO_CLIENT_ID'),
            'clientSecret' => getenv('VIMEO_CLIENT_SECRET'),
        ]
    ]
];

Ideal config file (references env var without exposing it to project)

<?php

return [
    'oauthProviderOptions' => [
        'vimeo' => [
            'clientId' => '$VIMEO_CLIENT_ID',
            'clientSecret' => '$VIMEO_CLIENT_SECRET',
        ]
    ]
];

Low res thumbnails

Description

The $size argument to getThumbnail appears to work incorrectly after upgrading from Craft 2 to 3. The thumbnails seems like it was transformed to the specified width, however it's now being upscaled from a low res version and is quite pixelated

Steps to reproduce

  1. video.getThumbnail(1600)
  2. thumbnail is pixelated

Same code Craft 2 <-> Craft 3
Screen Shot 2020-12-16 at 8 55 04 AM

Additional info

  • Plugin version: 2.0.12
  • Craft version: 3.5.16
  • PHP version:
  • Database driver & version:
  • Plugins & versions:

Private Video Thumbnail Issue

Description

Private Youtube video thumbnails are not loading. I've pinpointed the issue to be a problem with query string after the filename. In /vendor/dukt/videos/src/helpers/VideosHelper.php line #106, add parse_url before passing the path:

->saveAs(parse_url($path, PHP_URL_PATH));

Steps to reproduce

  1. In Craft admin, open a video field, and choose a private YouTube video
  2. The thumbnail does not load

Additional info

  • Plugin version:
  • Craft version: 3.1.9
  • PHP version: 7.1.25
  • Plugins & versions: 2.0.5

Vimeo Connection Issues / Bugs

Not sure what's happening here but I setup a Vimeo app on /admin/videos/settings and getting this even after successfully getting the Vimeo "Allow Access":

screen shot 2018-03-27 at 2 10 51 pm

Then on /admin/videos/settings/vimeo I'm seeing this:

screen shot 2018-03-27 at 2 12 07 pm

Any thoughts?

YouTube Access Token Expiry in project.yaml

Description

We're working across locations using project.yaml to sync our respective field changes across locally hosted copies of a site. We've also disabled admin access on our staging (centralised) copy of the site to avoid anyone accidentally editing fields or structures here.

Having added the Video plugin and made the connections to both Vimeo and YouTube, the YouTube connection generates a token that expires after 1 hour.

On the staging server with admin changes disabled, there is no way for the token to be refreshed in the project.yaml file as it's read only, therefore the connection breaks and the video browser fails to load.

The Vimeo connection doesn't appear to have an expiry set, with null appearing in the project.yaml file.

Steps to reproduce

  1. Connect to YouTube and Vimeo services locally
  2. Push project.yaml file to staging environment with admin changes disabled
  3. Wait 1 hour
  4. Attempt to browse videos from a video field to see the error below.

Screenshot 2019-05-15 at 15 21 45

Additional info

  • Plugin version: 2.0.6
  • Craft version: 3.1.25
  • PHP version: 7.3.5
  • Database driver & version: MySQL 5.7.26
  • Plugins & versions: n/a

Vimeo: Add support for unlisted videos

Hi!
First of all, thanks a lot for the amazing work on this plugin!

I was wondering whether you'd consider adding the possibility of linking unlisted Vimeo videos. The url of unlisted videos have a hash attached to them: https://vimeo.com/{vimeoId}/{hash}

In order to retrieve the video through the api, the hash needs to be passed using a colon: videos/{vimeoId}:{hash}.

Briefly looking at the code of the plugin, I'd assume that the extractVideoIdFromUrl would need to not only return the vimeoId but also the hash, which in turn would need to be passed to getVideoById as well. Appending the hash there ($this->get('videos/' . $id.':'.$hash) seems to properly fetch the video.

Thanks a lot for your consideration! 🙏

Additional info

  • Plugin version: 2.1.0
  • Craft version: 3.7.44
  • PHP version: 8.1

Saving Youtube video with emoji in description result in internal server error

Description

When adding a youtube link to an entry that contains a emoji in the description, saving the entry will result in an internal server error.

Steps to reproduce

  1. Create a new entry
  2. Add a youtube video that contains an emoji in the description (i.e. https://youtu.be/C-haWXG5sBo)
  3. Save the entry

Additional info

  • Plugin version: 2.0.6
  • Craft version: 3.1.27
  • PHP version: 7.2.18
  • Database driver & version: MySQL 5.7.26

TypeError when Migrating from Craft 2 -> 3

I'm currently working on upgrading a site from Craft 2 to 3 which uses the Videos plugin, and I've received the following error when attempting to access the plugin settings.

TypeError: Argument 2 passed to dukt\videos\services\Oauth::createTokenFromData() must be of the type array, string given, called in /vendor/dukt/videos/src/services/Oauth.php on line 82 and defined in /vendor/dukt/videos/src/services/Oauth.php:38
Stack trace:
#0 /vendor/dukt/videos/src/services/Oauth.php(82): dukt\videos\services\Oauth->createTokenFromData('vimeo', '1')
#1 /vendor/dukt/videos/src/base/Gateway.php(209): dukt\videos\services\Oauth->getToken('vimeo')
#2 /vendor/dukt/videos/src/base/Gateway.php(327): dukt\videos\base\Gateway->getOauthToken()
#3 /vendor/dukt/videos/src/controllers/SettingsController.php(35): dukt\videos\base\Gateway->getAccount()
#4 [internal function]: dukt\videos\controllers\SettingsController->actionIndex()
#5 /vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#6 /vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#7 /vendor/craftcms/cms/src/web/Controller.php(74): yii\base\Controller->runAction('index', Array)
#8 /vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('index', Array)
#9 /vendor/craftcms/cms/src/web/Application.php(244): yii\base\Module->runAction('videos/settings...', Array)
#10 /vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('videos/settings...', Array)
#11 /vendor/craftcms/cms/src/web/Application.php(233): yii\web\Application->handleRequest(Object(craft\web\Request))
#12 /vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#13 /web/index.php(21): yii\base\Application->run()
#14 ~/.composer/vendor/laravel/valet/server.php(147): require('~/...')
#15 {main}```

Unable to upgrade to Craft 3.7

Description

Seems like the same issue reported here: #49 when upgrading to Craft 3.6

image

Steps to reproduce

  1. Upgrade to Craft 3.7
  2. 500 erorr on any Craft admin pages using video field

Additional info

  • Plugin version: latest
  • Craft version: 3.7.4
  • PHP version: 8.0
  • Database driver & version: mysql

YouTube token issues

Description

Hi, We're seeing an issue where OAuth tokens are failing to refresh -- We've connected to youtube, and everything works, I can even see the token getting refreshed by watching the database records. But then, sometimes, seemingly randomly the token is removed, and we get the following error.

image

This is on a large website, that gets a reasonably high level of traffic. We are using Craft to serve data under multiple domains.

We've churned through the logs, but not found anything that would explain this behavior. Do you have any suggestions?

Additional info

  • Plugin version: 2.0.13
  • Craft version: 3.6.11.2
  • PHP version: 7.4.16
  • Database driver & version: MySQL 8

Not able to see all Youtube playlists

Description

I only see the 5 newest playlists listed in the video field modal, but we have more of them. Is there some configuration that I need to override or something?

Additional info

  • Plugin version: 2.0.10
  • Craft version: 3.3.17

Database Exception SQLSTATE[42S02]: Base table or view not found

Description

When updating from 2.0.7 to 2.0.8 and then trying to access admin/videos/settings, I get the following error:

Database Exception SQLSTATE[42S02]: Base table or view not found: 1146 Table 'example.test.craft_videos_tokens' doesn't exist
The SQL being executed was: SELECT *
FROM `craft_videos_tokens`
WHERE `gateway`='vimeo'

Steps to reproduce

  1. Update from 2.0.7 to 2.0.8
  2. Visit the plugin's settings page in CP

Additional info

  • Plugin version: 2.0.8
  • Craft version: Craft Pro 3.1.28
  • PHP version: 7.0.33
  • Database driver & version: MySQL 5.5.5
  • Plugins & versions:

Server Error: Saving image in "" format is not supported

Description

Since upgrading to Craft 3.6.13 we are seeing an internal server error on some entries in the control panel. Scrolling through the stack trace it appears to be because of the video helper function in this plugin

image

image

Steps to reproduce

  1. Upgrade to Craft 3.6.13
  2. Visit an entry that uses the Video field

Additional info

  • Plugin version: latest
  • Craft version: 3.6.13
  • PHP version: 8.0.3

Force https

Would like a way to force urls to come back with https instead of http.

A few ideas:

  1. Globally: in config/videos.php
  2. New variable: {{ video.httpsUrl }}
  3. Embed settings: {{ video.embed({ forceHttps: true }) }}

Unknown Method

I'm getting a Calling unknown method: dukt\videos\fields\Video::prepValue() when going to edit an entry that already existed before I added the new videos field to the section. Let me know if you need more from my logs.

When running php craft project-config/apply we keep getting a schemaVersion conflict

When running php craft project-config/apply we keep getting a schemaVersion conflict.
ERROR: Videos is installed with schema version of 1.0.3 while 1.0.4 was expected.
I have checked the Database plugins table, the composer.lock file and the project.yaml file and all of them say schema version 1.0.4. However in the Plugin.php file on line 44 it says schemaVersion set to 1.0.3.

Steps to reproduce

  1. Update videos plugin
  2. Try to run in console php craft project-config/apply

Additional info

  • Plugin version: 2.1.0
  • Craft version: 3.7.37
  • PHP version: 8.0.17
  • Database driver & version: MySQL 8.0.27

Saving image in "" format is not supported

Description

When adding some Vimeo videos to the CMS we get internal server errors of...

Saving image in "" format is not supported, please use one of the following extensions: "bmp", "gif", "jpeg", "png", "wbmp", "webp", "xbm"

When editing an entry with the broken Video saved, or...

{
    "error": "An exception has been thrown during the rendering of a template (\"Saving image in \"\" format is not supported, please use one of the following extensions: \"bmp\", \"gif\", \"jpeg\", \"png\", \"wbmp\", \"webp\", \"xbm\"\")."
}

AJAX error when adding the video itself.

  • This video is on the authenticated account
  • It has full permission and is publicly available
  • Re-uploading the same video then works

Steps to reproduce

  1. This video has the problem https://vimeo.com/431533545

Additional info

  • Plugin version: 2.0.10
  • Craft version: 3.4.24
  • PHP version: 7.4.4
  • Database driver & version: MySQL 5.7.30

[v3.x] Bug - Unhandled error when Videos can't resolve thumbnail MIME type (Vimeo)

Description

The plugin throws an unhandled error when unable to determine the MIME type of a video thumbnail image. We hit this issue specifically with Vimeo thumbs, across all the videos that we tried (5+). I think this is happening specifically for Vimeo thumbnail images because they are served without file extensions...

EDIT: I've figured out this only happens when also passing a width to getThumbnail(), as otherwise we just use the Vimeo thumbnail URL rather than grabbing the image and transforming it:

{# this will work #}
{{ video.getThumbnail() }}
{# this will error #}
{{ video.getThumbnail(300) }}

Original issue:

In VideosHelper::getVideoThumbnail():#L138-L149 we have

  $mimeByExt = FileHelper::getMimeTypeByExtension($originalPath);
  
  if (!$mimeByExt) {
      // Add the extension to the filename if it doesn’t have one
      $mime = FileHelper::getMimeType($originalPath); //<---- this can be an unhandled null
      $ext = FileHelper::getExtensionByMimeType($mime);


      if ($ext !== '' && $ext !== '0') {
          ....
      }
  }

However as of Craft 4, FileHelper::getMimeType() can return a null, which the current plugin code does not handle.

Adding a check + early return for this allows the error to be handled gracefully, albeit without showing the image.

    // Add the extension to the filename if it doesn’t have one
    $mime = FileHelper::getMimeType($originalPath);

    if (!$mime) {
        return null;
    }

Steps to reproduce

  1. Create a video field, connect to Vimeo and add a Vimeo video URL
  2. Attempt to call videoField.getThumbnail() from template

Stack trace:

Screenshot 2022-10-17 at 14 45 01

Additional info

  • Plugin version: 3.0.0-beta.1
  • Craft version: 4.2.7
  • PHP version: 8.1.11
  • Database driver & version: MySQL 10.3.36
  • Example Vimeo URL

Results

Description

Steps to reproduce

Additional info

  • Plugin version:
  • Craft version:
  • PHP version:
  • Database driver & version:
  • Plugins & versions:

Couldn’t load explorer manager.

yii\web\BadRequestHttpException: Request must accept JSON in response in /Users/sven/Projects/@superlab/brusselsphilharmonic.be/vendor/craftcms/cms/src/web/Controller.php:223
Stack trace:
#0 /Users/sven/Projects/@superlab/brusselsphilharmonic.be/vendor/dukt/videos/src/controllers/ExplorerController.php(41): craft\web\Controller->requireAcceptsJson()
#1 [internal function]: dukt\videos\controllers\ExplorerController->actionGetModal()
#2 /Users/sven/Projects/@superlab/brusselsphilharmonic.be/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#3 /Users/sven/Projects/@superlab/brusselsphilharmonic.be/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#4 /Users/sven/Projects/@superlab/brusselsphilharmonic.be/vendor/craftcms/cms/src/web/Controller.php(76): yii\base\Controller->runAction('get-modal', Array)
#5 /Users/sven/Projects/@superlab/brusselsphilharmonic.be/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('get-modal', Array)
#6 /Users/sven/Projects/@superlab/brusselsphilharmonic.be/vendor/craftcms/cms/src/web/Application.php(272): yii\base\Module->runAction('videos/explorer...', Array)
#7 /Users/sven/Projects/@superlab/brusselsphilharmonic.be/vendor/craftcms/cms/src/web/Application.php(520): craft\web\Application->runAction('videos/explorer...', Array)
#8 /Users/sven/Projects/@superlab/brusselsphilharmonic.be/vendor/craftcms/cms/src/web/Application.php(256): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#9 /Users/sven/Projects/@superlab/brusselsphilharmonic.be/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#10 /Users/sven/Projects/@superlab/brusselsphilharmonic.be/web/index.php(21): yii\base\Application->run()
#11 {main}

screen shot 2018-05-02 at 09 06 01

Video search in uploaded videos

Hello

Would it be possible to enable searching for the uploaded Vimeo videos? Since the search bar is available when clicking on "Library / Uploads" my client was expecting that he would be able to search his uploaded videos. However, the search seems to work only globally on Vimeo.

It would be great if this feature could be added to the plugin. Right now we are still using the trial version, but I would like to recommend the plugin to my clients. However, right now I feel some crucial functions are missing.

m190601_092217_tokens.php fails Craft 2 -> Craft 3.3.20.1

Description

The m190601_092217_tokens.php migration fails when coming from Craft 2.

Exception: unserialize(): Error at offset 0 of 457339 bytes (/app/vendor/dukt/videos/src/migrations/m190601_092217_tokens.php:47)
#0 /app/vendor/dukt/videos/src/migrations/m190601_092217_tokens.php(47): yii\console\ErrorHandler->handleError()
#1 /app/vendor/dukt/videos/src/migrations/m190601_092217_tokens.php(47): ::unserialize()
#2 /app/vendor/dukt/videos/src/migrations/m190601_092217_tokens.php(21): dukt\videos\migrations\m190601_092217_tokens->insertDefaultData()
#3 /app/vendor/craftcms/cms/src/db/Migration.php(58): dukt\videos\migrations\m190601_092217_tokens->safeUp()
#4 /app/vendor/craftcms/cms/src/db/MigrationManager.php(239): dukt\videos\migrations\m190601_092217_tokens->up()
#5 /app/vendor/craftcms/cms/src/db/MigrationManager.php(159): craft\db\MigrationManager->migrateUp()
#6 /app/vendor/craftcms/cms/src/services/Updates.php(238): craft\db\MigrationManager->up()
#7 /app/vendor/craftcms/cms/src/console/controllers/MigrateController.php(265): craft\services\Updates->runMigrations()
#8 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): craft\console\controllers\MigrateController->actionAll()
#9 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): ::call_user_func_array:{/app/vendor/yiisoft/yii2/base/InlineAction.php:57}()
#10 /app/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams()
#11 /app/vendor/yiisoft/yii2/console/Controller.php(164): craft\console\controllers\MigrateController->runAction()
#12 /app/vendor/yiisoft/yii2/base/Module.php(528): craft\console\controllers\MigrateController->runAction()
#13 /app/vendor/yiisoft/yii2/console/Application.php(180): craft\console\Application->runAction()
#14 /app/vendor/craftcms/cms/src/console/Application.php(93): craft\console\Application->runAction()
#15 /app/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction()
#16 /app/vendor/yiisoft/yii2/base/Application.php(386): craft\console\Application->handleRequest()
#17 /app/craft(26): craft\console\Application->run()
#18 {main}
Exception 'craft\errors\MigrateException' with message 'An error occurred while migrating Videos.'

in /app/vendor/craftcms/cms/src/services/Updates.php:246

Steps to reproduce

  1. Migrate a Craft 2 DB to Craft 3.3.20.1
  2. Run php craft migrate/all
  3. The migration will fail on m190601_092217_tokens.php

Additional info

  • Plugin version: 2.0.10
  • Craft version: 3.3.20.1
  • PHP version: 7.2
  • Database driver & version: MySQL 5.6
  • Plugins & versions: N/A

Native Craft CMS GraphQL support

Description

I am currently trialing this plugin on a Craft CMS instance running in headless mode and when I tried to query the field using Graph(i)QL, it returns a null value for the field. The video model within this plugin doesn't seem to be exposed to the native GraphQL implementation of Craft CMS.

Not having native GraphQL support is a deal-breaker for me at the moment.

Any thoughts?

Thank you.

Additional info

  • Plugin version: 2.0.13
  • Craft version: 3.6.4.1
  • PHP version: 7.3
  • Database driver & version: PGSQL 11

Fields losing their value when updating search index

Description

I had to fix an issue at a client's page by rebuilding the search index by using ./craft resave/entries --section=xxx site=xxx --update-search-index. My issue was fixed, however, all video fields lost their value and where empty thereafter.

There were filled with Vimeo videos. I therefore do not know whether the same problem exists with YouTube videos.

Steps to reproduce

  1. Run --update-search-index on a site
  2. See how all video fields are empty thereafter ;-)

Additional info

  • Plugin version: 2.0.15
  • Craft version: Craft Pro 3.6.17
  • PHP version: 7.3.28
  • Database driver & version: MySQL 5.7.22
  • Plugins & versions:

YouTube videos can play simultaneously on one page

Description

If you add multiple YouTube videos to a single page, the user can play them simultaneously. This violates the YouTube API license agreement. I discovered this because my site was just audited by Google and this was one of the violations.

Migration Error Updating to 2.0.9

Description

When trying to upgrade from 2.0.8 to 2.0.9 in a production site we are seeing the following read only error when allowadminchanges is set to false (via config/general.php). This is despite the correct project.config file being updated and pushed to source control in our development environment and deployed as part of the code base (so no changes should be required)

Video Migration Fail

Subsequent attempts to apply the update then state that the migration failed because the new table craft_videos_tokens already exists (this isn't really an issue if the first attempt succeeded)

DB already exisits

Steps to reproduce

  1. Commit updated composer.json and project.config files to source control
  2. Ensure that set 'allowAdminChanges' => false, for production mode
  3. Deploy codebase to upgrade 2.0.8 to 2.0.9 (tried both via composer or the UI)
  4. First failure states that changes to the project config are not possible in read only mode
  5. Second failure states that the craft_videos_tokens table already exists (not the cause or an issue but adding anyway)

Additional info

  • Plugin version: 2.0.9
  • Craft version: 3.1.28
  • PHP version: 7.1.28
  • Database driver & version: MySQL 5.7.12

Impossible to access an attribute

I'm getting a Impossible to access an attribute ("title") on a string variable ("http://youtu.be/zB4I68XVPzQ"). error when trying to output the video using the variables.

It doesn't seem like it's using the variable properly?

here's what isn't working:

{% set videoBlock = entry.videoFeatureBlock.one() %}
{% set vid = videoBlock.video %}
{{ vid.title }}

Below works however, but I was thinking it would be simpler?

{% set videoBlock = entry.videoFeatureBlock.one() %}
{% set vid = craft.videos.getVideoByUrl(videoBlock.video) %}
{{ vid.title }}

Does this plugin work with Vimeo Pro?

Description

Can we use this plugin to work with Vimeo Pro videos that are set to "hidden"?
Mind that the vimeo API will not find the video without first logging in... Is this foreseen?

Thanks
www.but.be

Wrong durationSeconds returned for youtube videos

Description

The durationSeconds does not return the full amount of seconds of the video (minutes + seconds added up) but returns only the second information
E.g. Video duration is 4:15 --> durationSeconds returns 15
E.g. https://www.youtube.com/watch?v=wLhGuE1rVx0

Steps to reproduce

  1. add youtube video (e.g. https://ww.youtube.com/watch?v=wLhGuE1rVx0) with videos plugin
  2. compare durationSeconds property with actual duration in seconds of the video

Additional info

  • Plugin version: 2.0.10
  • Craft version: 3.1.15
  • PHP version: PHP 7.2.19
  • Database driver & version: mysql Ver 8.0.16

Failed migration Craft 2->Craft3

Description

Upgrade from Craft 2-3 Migration fails. Videos fields are now empty.

Steps to reproduce

  1. Update to from Craft 2 to Craft 3
  2. Install Videos and try to "Finish Up"

Any help would be greatly appreciated! Thanks.

Here's the full error:

Unknown Property: Getting unknown property: craft\models\Info::config

Migration: dukt\videos\migrations\m190601_092217_tokens

Output:

> create table {{%videos_tokens}} ... done (time: 0.015s)
> create unique index craft_videos_tokens_gateway_unq_idx on {{%videos_tokens}} (gateway) ... done (time: 0.011s)
Exception: Getting unknown property: craft\models\Info::config (/Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/base/Component.php:154)
#0 /Users/dylan/Sites/vera-c3/vendor/dukt/videos/src/migrations/m190601_092217_tokens.php(47): yii\base\Component->__get('config')
#1 /Users/dylan/Sites/vera-c3/vendor/dukt/videos/src/migrations/m190601_092217_tokens.php(21): dukt\videos\migrations\m190601_092217_tokens->insertDefaultData()
#2 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/db/Migration.php(52): dukt\videos\migrations\m190601_092217_tokens->safeUp()
#3 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/db/MigrationManager.php(232): craft\db\Migration->up(true)
#4 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/db/MigrationManager.php(148): craft\db\MigrationManager->migrateUp(Object(dukt\videos\migrations\m190601_092217_tokens))
#5 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/services/Updates.php(227): craft\db\MigrationManager->up()
#6 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/controllers/BaseUpdaterController.php(509): craft\services\Updates->runMigrations(Array)
#7 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/controllers/UpdaterController.php(203): craft\controllers\BaseUpdaterController->runMigrations(Array, 'restore-db')
#8 [internal function]: craft\controllers\UpdaterController->actionMigrate()
#9 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#10 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/base/Controller.php(180): yii\base\InlineAction->runWithParams(Array)
#11 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/web/Controller.php(181): yii\base\Controller->runAction('migrate', Array)
#12 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('migrate', Array)
#13 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/web/Application.php(294): yii\base\Module->runAction('updater/migrate', Array)
#14 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/web/Application.php(684): craft\web\Application->runAction('updater/migrate')
#15 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/web/Application.php(247): craft\web\Application->_processUpdateLogic(Object(craft\web\Request))
#16 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#17 /Users/dylan/Sites/vera-c3/web/index.php(22): yii\base\Application->run()
#18 {main}

Additional info

  • Plugin version: Videos 2.0.10
  • Craft version: 3.5.5
  • PHP version: 7.2.20
  • Database driver & version: MySQL 5.7.26
  • Plugins & versions:

Accessing, in templates, an object of all videos

A project I'm working on needs a video gallery of all the videos on a particular Vimeo channel. I'm also planning on using the Video plugin on this project. Rather than manually retrieving a list of the videos myself, I wonder if there's a way to use the data the Video plugin is configured to retrieve. Assuming this doesn't already exist as an undocumented feature, it'd be amazing to add an enhancement that would support using something like {{ craft.video.videos }} to return an object with all the videos' data. Thoughts?

Craft 4 Support?

Description

I can see that a Craft 4 beta version is already available, will this be moving to an official release soon as this is the last plugin blocking our move to Craft 4.

Option to store thumbnails in volume

Description

Currently, thumbnails within the CP are referenced from cpresources. In load-balanced environments these files may not exist, since it has been generated on one instance, but not any others. This results in the following error.

The file or directory to be published does not exist:

Could an option be added to store thumbnails within a Craft Volume? We use AWS S3 to access the same assets across multiple web server instances.

Additional info

  • Plugin version: 2.0.4
  • Craft version: 3.4.27
  • PHP version: 7.3
  • Database driver & version: MySQL 5.7

Cannot have videos and social installed together

I'm trying to upgrade a Craft 2 site right now and running into an issue installing Videos and Social together.

In our upgrade I installed Social first and that was fine but then couldn't get Videos installed.

I then tried a clean Craft 3 instance installing Videos first but then couldn't get Social installed.

Composer message was

Problem 1
- Installation request for dukt/social ^2.0 -> satisfiable by dukt/social[2.0.0].
- Conclusion: remove league/oauth2-google 2.2.0
- Conclusion: don't install league/oauth2-google 2.2.0
- dukt/social 2.0.0 requires league/oauth2-google ^3.0 -> satisfiable by league/oauth2-google[3.0.0, 3.0.1].
- Can only install one of: league/oauth2-google[3.0.0, 2.2.0].
- Can only install one of: league/oauth2-google[3.0.1, 2.2.0].
- Installation request for league/oauth2-google (locked at 2.2.0) -> satisfiable by league/oauth2-google[2.2.0].

Any ideas to resolve this?

dukt\videos\errors\VideoNotFoundException: Video not found

Description

We're having an intermittent issue with the Videos plugin where every so often we receive dukt\videos\errors\VideoNotFoundException: Video not found when adding a YouTube URL. Example - https://www.youtube.com/watch?v=RaKxMVBwxRc&feature=youtu.be

This doesn't happen all the time. That same youtube URL is working as expected currently, but last night was causing an error. Could it be an issue with the YouTube API?

From the logs -

2019-12-18 19:12:51 [-][91][-][error][dukt\videos\errors\VideoNotFoundException] dukt\videos\errors\VideoNotFoundException: Video not found. in /home/forge/theface.com/vendor/dukt/videos/src/controllers/ExplorerController.php:152
Stack trace:
#0 [internal function]: dukt\videos\controllers\ExplorerController->actionFieldPreview()
#1 /home/forge/theface.com/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#2 /home/forge/theface.com/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#3 /home/forge/theface.com/vendor/craftcms/cms/src/web/Controller.php(187): yii\base\Controller->runAction('field-preview', Array)
#4 /home/forge/theface.com/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('field-preview', Array)
#5 /home/forge/theface.com/vendor/craftcms/cms/src/web/Application.php(299): yii\base\Module->runAction('videos/explorer...', Array)
#6 /home/forge/theface.com/vendor/craftcms/cms/src/web/Application.php(566): craft\web\Application->runAction('videos/explorer...', Array)
#7 /home/forge/theface.com/vendor/craftcms/cms/src/web/Application.php(278): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#8 /home/forge/theface.com/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#9 /home/forge/theface.com/public/index.php(23): yii\base\Application->run()
#10 {main}
2019-12-18 19:12:51 [-][91][-][info][application] $_GET = [
    'p' => 'cms-admin/actions/videos/explorer/field-preview'
]

$_POST = [
    'url' => 'https://www.youtube.com/watch?v=RaKxMVBwxRc&feature=youtu.be'
]

Steps to reproduce

  1. Add YouTube URL to a videos field

Additional info

  • Plugin version: 2.0.10
  • Craft version: 3.3.11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.