Commit dd4148de authored by Gaurav Kapoor's avatar Gaurav Kapoor Committed by Gaurav Kapoor
Browse files

Issue #3257192 by gaurav.kapoor: Fix library path in the module

parent 5b2443b6
Loading
Loading
Loading
Loading
+2 −2
Changes for src/Plugin/CKEditorPlugin/Tweetbutton.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ class Tweetbutton extends CKEditorPluginBase {
   * Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getFile().
   */
  public function getFile() {
    return 'libraries/tweetable_text/plugin.js';
    return 'libraries/tweetabletext/plugin.js';
  }

  /**
@@ -44,7 +44,7 @@ class Tweetbutton extends CKEditorPluginBase {
    return [
      'TweetableText' => [
        'label' => $this->t('Tweet Button'),
        'image' => base_path() . 'libraries/tweetable_text/icons/tweetabletext.png',
        'image' => base_path() . 'libraries/tweetabletext/icons/tweetabletext.png',
      ],
    ];
  }
+4 −4
Changes for tweetext.install: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -11,20 +11,20 @@
function tweetext_requirements($phase) {
  $requirements = [];

  $path = 'libraries/tweetable_text/plugin.js';
  $path = 'libraries/tweetabletext/plugin.js';
  if (\Drupal::moduleHandler()->moduleExists('libraries')) {
    $path = \Drupal::service('libraries.manager')->load('tweetable_text') . '/plugin.js';
    $path = \Drupal::service('libraries.manager')->load('tweetabletext') . '/plugin.js';
  }
  $path = DRUPAL_ROOT . '/' . $path;

  if (!file_exists($path)) {
    $requirements['tweetext'] = [
      'title' => t('tweetable_text library is missing'),
      'title' => t('tweetabletext library is missing'),
      'value' => t('Plugin not detected'),
      'severity' => REQUIREMENT_ERROR,
      'description' => t('tweetext requires the plugin.js library.
       Download the plugin from http://ckeditor.com/addon/tweetabletext, and place it in the libraries folder
       (/libraries/tweetable_text)'),
       (/libraries/tweetabletext)'),
    ];
  }
  else {