I'm using CKEditor 4.5.6 for an WebsiteBuilder and I added this Glyphicons plugin:
Glyphicon CKEditor Plugin
My problem is that when I want to move the icon, it disappears and got an error:
Uncaught TypeError: el.find is not a function
at getFirstTextNode (plugin.js?t=FB9E:2150)
at preserveSpaces (plugin.js?t=FB9E:2121)
at Repository.wrapElement (plugin.js?t=FB9E:699)
at a.<anonymous> (plugin.js?t=FB9E:2920)
at a.q (ckeditor.js:10)
at a.<anonymous> (ckeditor.js:12)
at a.CKEDITOR.editor.CKEDITOR.editor.fire (ckeditor.js:13)
at CKEDITOR.htmlDataProcessor.toHtml (ckeditor.js:300)
at ckeditor.js:373
at b.insertHtml (ckeditor.js:341)
getFirstTextNode # plugin.js?t=FB9E:2150
preserveSpaces # plugin.js?t=FB9E:2121
wrapElement # plugin.js?t=FB9E:699
(anonymous) # plugin.js?t=FB9E:2920
q # ckeditor.js:10
(anonymous) # ckeditor.js:12
CKEDITOR.editor.CKEDITOR.editor.fire # ckeditor.js:13
toHtml # ckeditor.js:300
(anonymous) # ckeditor.js:373
insertHtml # ckeditor.js:341
(anonymous) # ckeditor.js:351
q # ckeditor.js:10
(anonymous) # ckeditor.js:12
CKEDITOR.editor.CKEDITOR.editor.fire # ckeditor.js:13
insertHtml # ckeditor.js:254
(anonymous) # ckeditor.js:653
q # ckeditor.js:10
(anonymous) # ckeditor.js:12
CKEDITOR.editor.CKEDITOR.editor.fire # ckeditor.js:13
r # ckeditor.js:626
internalDrop # ckeditor.js:657
(anonymous) # ckeditor.js:647
setTimeout (async)
(anonymous) # ckeditor.js:647
q # ckeditor.js:10
(anonymous) # ckeditor.js:12
CKEDITOR.editor.CKEDITOR.editor.fire # ckeditor.js:13
e # ckeditor.js:644
(anonymous) # ckeditor.js:647
q # ckeditor.js:10
(anonymous) # ckeditor.js:12
(anonymous) # ckeditor.js:52
Did someone meet this problem. Can it be resolved in an wasy way? I'm using CKEditor for the first time, so I don't have big experiences with it.
P.S.: I've already used the plugin discussion to ask for help.
There was a big refactor of the widget plugin, which broke a few plugins depending on this one (eg. placeholder, token)
This is the share of the commit
https://github.com/ckeditor/ckeditor-dev/commit/2fca8e6248aebab164133e9cd97403cb2de9a006
So you will need to reach out to the maintainer of the widget
If the plugin is not updated, you will need to use old version of widget.
Related
I am building a static tab for MS Teams with contentBotId specified.The staticTabs manifest entry looks as following:
"staticTabs": [
{
"entityId": "availability",
"name": "Availability",
"scopes": [ "personal" ],
"contentBotId": "myBotId",
"context": [ "personalTab" ]
},
{
"entityId": "coffees",
"name": "Coffees",
"scopes": [ "personal" ],
"contentUrl": "https://my-content-url.com/...",
"websiteUrl": "https://my-website-url.com/...",
"context": ["personalTab"]
}
],
So, the Availability tab is using contentBotId and Coffees tab is a website. I have no problems with Coffees tab at all but have problems with Availability tab in chat scope. when I am trying to open the Availability tab from personal apps side panel - all works as expected:
But when I am trying to open the same tab from chat with my bot - MS Teams shows There was a problem reaching this app error:
In MS Team Dev console I can see the following errors:
CDL: {"errorCode":"Error","requestId":"q-15","hostRendererId":"5e3ce6c0-2b1f-4285-8d4b-75ee78787346","component":"RequestHandler","requestWindowId":"main","operationType":"query","operationName":"appDefinition","message":"error while processing q-15: {\"name\":\"Error\",\"message\":\"Variable \\\"$appId\\\" got invalid value undefined; Expected non-nullable type \\\"ID!\\\" not to be null.\",\"stack\":[]} (reason: undefined)"}
console.error # ?agent=electron&version=21071502213:1
invoke # main-2d2eb2cbb891032b.js:22
error # main-2d2eb2cbb891032b.js:22
(anonymous) # main-2d2eb2cbb891032b.js:22
safeWrapILoggerCall # main-2d2eb2cbb891032b.js:22
error # main-2d2eb2cbb891032b.js:22
onError # main-2d2eb2cbb891032b.js:22
setResponseAndEndScenario # main-2d2eb2cbb891032b.js:22
reconcileResponse # main-2d2eb2cbb891032b.js:22
onMessageReceived # main-2d2eb2cbb891032b.js:22
(anonymous) # main-2d2eb2cbb891032b.js:22
(anonymous) # main-2d2eb2cbb891032b.js:22
(anonymous) # main-2d2eb2cbb891032b.js:27
(anonymous) # main-2d2eb2cbb891032b.js:27
(anonymous) # VM5:2
emit # electron/js2c/sandbox_bundle.js:170
onMessage # electron/js2c/sandbox_bundle.js:151
TrackRequestLink: 'appDefinition' operation of type 'query' failed.
console.error # ?agent=electron&version=21071502213:1
invoke # main-2d2eb2cbb891032b.js:22
error # main-2d2eb2cbb891032b.js:22
(anonymous) # main-2d2eb2cbb891032b.js:22
Ds # main-2d2eb2cbb891032b.js:22
Ms # main-2d2eb2cbb891032b.js:22
error # main-2d2eb2cbb891032b.js:22
m # 73296-3f79f77061841a23.js:1
b # 73296-3f79f77061841a23.js:1
value # 73296-3f79f77061841a23.js:1
error # 73296-3f79f77061841a23.js:1
m # 73296-3f79f77061841a23.js:1
b # 73296-3f79f77061841a23.js:1
value # 73296-3f79f77061841a23.js:1
(anonymous) # main-2d2eb2cbb891032b.js:22
onError # main-2d2eb2cbb891032b.js:22
onError # main-2d2eb2cbb891032b.js:22
setResponseAndEndScenario # main-2d2eb2cbb891032b.js:22
reconcileResponse # main-2d2eb2cbb891032b.js:22
onMessageReceived # main-2d2eb2cbb891032b.js:22
(anonymous) # main-2d2eb2cbb891032b.js:22
(anonymous) # main-2d2eb2cbb891032b.js:22
(anonymous) # main-2d2eb2cbb891032b.js:27
(anonymous) # main-2d2eb2cbb891032b.js:27
(anonymous) # VM5:2
emit # electron/js2c/sandbox_bundle.js:170
onMessage # electron/js2c/sandbox_bundle.js:151
TrackRequestLink: Errors ['{"name":"Error","message":"Variable \"$appId\" got invalid value undefined; Expected non-nullable type \"ID!\" not to be null.","stack":[]}']
Error: Unable to fetch app definition
I've double checked manifest schema and think I am not missing anything but might be wrong. Please correct me if so. The schema I am using is: https://developer.microsoft.com/en-us/json-schemas/teams/v1.9/MicrosoftTeams.schema.json and manifest version is 1.9
Let me know if you need more details from me and thank you for help!
I've not ever tried using contentBotId as I've always had web content behind my tab, but as a backup you can consider creating a web page / SPA that simply hosts and renders your adaptive card using the javascript library. Here's an example: https://learn.microsoft.com/en-us/adaptive-cards/sdk/rendering-cards/javascript/render-a-card
This bug fix is on the way. We do not have exact ETA to share but it will be available publicly soon.
how can i use pg_search_scope in combination with Mobility for translated attributes? Available languages are :de and :en. Searching for category names return empty results. There mus be a way to search for locale_accessors, in my case it should be name_de || name_en depending on current i18n.locale settings.
Here's my controller method:
def index
#categories = params[:query].present? ? Category.search(params[:query]) : Category.all.includes(%i[string_translations])
end
Here's my model:
class Category < ApplicationRecord
extend Mobility
translates :name, type: :string
include PgSearch::Model
pg_search_scope :search,
against: [:name],
using: {
trigram: { threshold: 0.3, word_similarity: true }
}
end
Here's my mobility config:
Mobility.configure do
# PLUGINS
plugins do
# Backend
#
# Sets the default backend to use in models. This can be overridden in models
# by passing +backend: ...+ to +translates+.
#
# To default to a different backend globally, replace +:key_value+ by another
# backend name.
#
backend :key_value
# ActiveRecord
#
# Defines ActiveRecord as ORM, and enables ActiveRecord-specific plugins.
active_record
# Accessors
#
# Define reader and writer methods for translated attributes. Remove either
# to disable globally, or pass +reader: false+ or +writer: false+ to
# +translates+ in any translated model.
#
reader
writer
# Backend Reader
#
# Defines reader to access the backend for any attribute, of the form
# +<attribute>_backend+.
#
backend_reader
#
# Or pass an interpolation string to define a different pattern:
# backend_reader "%s_translations"
# Query
#
# Defines a scope on the model class which allows querying on
# translated attributes. The default scope is named +i18n+, pass a different
# name as default to change the global default, or to +translates+ in any
# model to change it for that model alone.
#
query
# Cache
#
# Comment out to disable caching reads and writes.
#
cache
# Dirty
#
# Uncomment this line to include and enable globally:
# dirty
#
# Or uncomment this line to include but disable by default, and only enable
# per model by passing +dirty: true+ to +translates+.
# dirty false
# Fallbacks
#
# Uncomment line below to enable fallbacks, using +I18n.fallbacks+.
# fallbacks
#
# Or uncomment this line to enable fallbacks with a global default.
# fallbacks { :pt => :en }
# Presence
#
# Converts blank strings to nil on reads and writes. Comment out to
# disable.
#
presence
# Default
#
# Set a default translation per attributes. When enabled, passing +default:
# 'foo'+ sets a default translation string to show in case no translation is
# present. Can also be passed a proc.
#
# default 'foo'
# Fallthrough Accessors
#
# Uses method_missing to define locale-specific accessor methods like
# +title_en+, +title_en=+, +title_fr+, +title_fr=+ for each translated
# attribute. If you know what set of locales you want to support, it's
# generally better to use Locale Accessors (or both together) since
# +method_missing+ is very slow. (You can use both fallthrough and locale
# accessor plugins together without conflict.)
#
# fallthrough_accessors
# Locale Accessors
#
# Uses +def+ to define accessor methods for a set of locales. By default uses
# +I18n.available_locales+, but you can pass the set of locales with
# +translates+ and/or set a global default here.
#
locale_accessors
#
# Or define specific defaults by uncommenting line below
# locale_accessors [:en, :ja]
# Attribute Methods
#
# Adds translated attributes to +attributes+ hash, and defines methods
# +translated_attributes+ and +untranslated_attributes+ which return hashes
# with translated and untranslated attributes, respectively. Be aware that
# this plugin can create conflicts with other gems.
#
# attribute_methods
end
end
Is it possible and how it works?
Thank you very much for help me out in this case!
You can use dynamic scope with lambda and return the config hash with the query:
pg_search_scope :search, lambda { |query|
{
against: ["name_#{I18n.locale}".to_sym],
trigram: { threshold: 0.3, word_similarity: true },
ignoring: :accents,
query: query
}
}
I have installed craft CMS 3 via composer, running on MAMP (windows 10) and successfully created a few templates and entries.
However, When I try to access the plugin store I see the following error on the page: "The Plugin Store is not available, please try again later."
and in the console I see the two internal server errors copied below:
I was able to install the contact form plugin via composer. but not for other plugins (e.g. sprout forms)
I am also seeing an 'unknown error' message at the dashboard: jquery.js:9566 POST http://localhost:81/index.php?p=admin/actions/dashboard/get-feed-items 500 (Internal Server Error)
Has anyone else seen this issue?
Console error messages when trying to access the plugin store:
axios.js:853 GET http://localhost:81/index.php?p=admin/actions/plugin-store/plugin-store-data 500 (Internal Server Error)
(anonymous) # axios.js:853
e.exports # axios.js:687
e.exports # axios.js:1367
Promise.then (async)
a.request # axios.js:525
a.(anonymous function) # axios.js:535
(anonymous) # axios.js:439
Q # main.js:1
(anonymous) # main.js:1
getPluginStoreData # main.js:1
(anonymous) # vuex.js:710
l.dispatch # vuex.js:432
dispatch # vuex.js:338
created # main.js:1
yt # vue.min.js:6
pn._init # vue.min.js:6
pn # vue.min.js:6
(anonymous) # main.js:1
l # jquery.js:3583
c # jquery.js:3651
setTimeout (async)
(anonymous) # jquery.js:3689
c # jquery.js:3317
fireWith # jquery.js:3447
fire # jquery.js:3455
c # jquery.js:3317
fireWith # jquery.js:3447
ready # jquery.js:3920
B # jquery.js:3930
axios.js:853
GET http://localhost:81/index.php?p=admin/actions/plugin-store/craft-data 500 (Internal Server Error)
(anonymous) # axios.js:853
e.exports # axios.js:687
e.exports # axios.js:1367
Promise.then (async)
a.request # axios.js:525
a.(anonymous function) # axios.js:535
(anonymous) # axios.js:439
W # main.js:1
(anonymous) # main.js:1
getCraftData # main.js:1
(anonymous) # vuex.js:710
l.dispatch # vuex.js:432
dispatch # vuex.js:338
created # main.js:1
yt # vue.min.js:6
pn._init # vue.min.js:6
pn # vue.min.js:6
(anonymous) # main.js:1
l # jquery.js:3583
c # jquery.js:3651
setTimeout (async)
(anonymous) # jquery.js:3689
c # jquery.js:3317
fireWith # jquery.js:3447
fire # jquery.js:3455
c # jquery.js:3317
fireWith # jquery.js:3447
ready # jquery.js:3920
B # jquery.js:3930
this was a curl 60 error. To fix it, I downloaded cacert.pem from curl.haxx.se/ca/cacert.pem and saved it into the same folder that I have my mamp php version. Then referenced this in php.ini like so:
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
curl.cainfo ="{{ path to cacert.pem"}}
ok so I can get to active admin on local and my site just fine - within active admin I have the options to select from Pins or Users (my two models) on local, can see all of the pins and users in the db just fine. However, live (heroku) I can access active admin barnpix.com/admin and clicking on pins works just fine ..however when I click users I get a generic heroku error... please help why does this work in local but not live?
Omrails::Application.routes.draw do
get "pages/tagz"
get "pages/about"
get "posts/show"
get "posts/destroy"
root :to => 'pins#index'
get 'tags/:tag' , to: 'pins#index', as: :tag
get "posts", to: "posts#index"
resources :posts
resources :pins
get "users/show"
devise_for :users
match 'users/:id' => 'users#show', as: :user
ActiveAdmin.routes(self)
devise_for :admin_users, ActiveAdmin::Devise.config
ActiveAdmin.routes(self)
devise_for :views
ActiveAdmin.routes(self)
ActiveAdmin.setup do |config|
# == Site Title
#
# Set the title that is displayed on the main layout
# for each of the active admin pages.
#
config.site_title = "BarnPix.com"
# Set the link url for the title. For example, to take
# users to your main site. Defaults to no link.
#
config.site_title_link = "http://www.barnpix.com"
# Set an optional image to be displayed for the header
# instead of a string (overrides :site_title)
#
# Note: Recommended image height is 21px to properly fit in the header
#
# config.site_title_image = "/images/logo.png"
# == Default Namespace
#
# Set the default namespace each administration resource
# will be added to.
#
# eg:
# config.default_namespace = :hello_world
#
# This will create resources in the HelloWorld module and
# will namespace routes to /hello_world/*
#
# To set no namespace by default, use:
# config.default_namespace = false
#
# Default:
# config.default_namespace = :admin
#
# You can customize the settings for each namespace by using
# a namespace block. For example, to change the site title
# within a namespace:
#
# config.namespace :admin do |admin|
# admin.site_title = "Custom Admin Title"
# end
#
# This will ONLY change the title for the admin section. Other
# namespaces will continue to use the main "site_title" configuration.
# == User Authentication
#
# Active Admin will automatically call an authentication
# method in a before filter of all controller actions to
# ensure that there is a currently logged in admin user.
#
# This setting changes the method which Active Admin calls
# within the controller.
config.authentication_method = :authenticate_admin_user!
# == Current User
#
# Active Admin will associate actions with the current
# user performing them.
#
# This setting changes the method which Active Admin calls
# to return the currently logged in user.
config.current_user_method = :current_admin_user
# == Logging Out
#
# Active Admin displays a logout link on each screen. These
# settings configure the location and method used for the link.
#
# This setting changes the path where the link points to. If it's
# a string, the strings is used as the path. If it's a Symbol, we
# will call the method to return the path.
#
# Default:
config.logout_link_path = :destroy_admin_user_session_path
# This setting changes the http method used when rendering the
# link. For example :get, :delete, :put, etc..
#
# Default:
# config.logout_link_method = :get
# == Root
#
# Set the action to call for the root path. You can set different
# roots for each namespace.
#
# Default:
# config.root_to = 'dashboard#index'
# == Admin Comments
#
# Admin comments allow you to add comments to any model for admin use.
# Admin comments are enabled by default.
#
# Default:
# config.allow_comments = true
#
# You can turn them on and off for any given namespace by using a
# namespace config block.
#
# Eg:
# config.namespace :without_comments do |without_comments|
# without_comments.allow_comments = false
# end
# == Batch Actions
#
# Enable and disable Batch Actions
#
config.batch_actions = true
# == Controller Filters
#
# You can add before, after and around filters to all of your
# Active Admin resources and pages from here.
#
# config.before_filter :do_something_awesome
# == Register Stylesheets & Javascripts
#
# We recommend using the built in Active Admin layout and loading
# up your own stylesheets / javascripts to customize the look
# and feel.
#
# To load a stylesheet:
# config.register_stylesheet 'my_stylesheet.css'
# You can provide an options hash for more control, which is passed along to stylesheet_link_tag():
# config.register_stylesheet 'my_print_stylesheet.css', :media => :print
#
# To load a javascript file:
# config.register_javascript 'my_javascript.js'
# == CSV options
#
# Set the CSV builder separator (default is ",")
# config.csv_column_separator = ','
#
# Set the CSV builder options (default is {})
# config.csv_options = {}
# == Menu System
#
# You can add a navigation menu to be used in your application, or configure a provided menu
#
# To change the default utility navigation to show a link to your website & a logout btn
#
# config.namespace :admin do |admin|
# admin.build_menu :utility_navigation do |menu|
# menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
# admin.add_logout_button_to_menu menu
# end
# end
#
# If you wanted to add a static menu item to the default menu provided:
#
# config.namespace :admin do |admin|
# admin.build_menu :default do |menu|
# menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
# end
# end
# == Download Links
#
# You can disable download links on resource listing pages,
# or customize the formats shown per namespace/globally
#
# To disable/customize for the :admin namespace:
#
# config.namespace :admin do |admin|
#
# # Disable the links entirely
# admin.download_links = false
#
# # Only show XML & PDF options
# admin.download_links = [:xml, :pdf]
#
# end
# == Pagination
#
# Pagination is enabled by default for all resources.
# You can control the default per page count for all resources here.
#
#config.default_per_page = 30
# == Filters
#
# By default the index screen includes a “Filters” sidebar on the right
# hand side with a filter for each attribute of the registered model.
# You can enable or disable them for all resources here.
#
# config.filters = true
end
For some reason, I've to disable javascript for Firefox (Manually, we do by following steps mentioned http://support.mozilla.org/en-US/kb/javascript-settings-for-interactive-web-pages#w_enabling-and-disabling-javascript). How can this be achieved by Selenium WebDriver using Ruby?
Yes, It is possible. But a different way. You first need to look into the link
Selenium::WebDriver::Firefox::Profile #[]=(key, value).
JavaScript settings
Once you would visit the link,try the below code :
require 'selenium-webdriver'
profile = Selenium::WebDriver::Firefox::Profile.new
profile["javascript.enabled"] = false
driver = Selenium::WebDriver.for(:firefox, :profile => profile)
profile
# => #<Selenium::WebDriver::Firefox::Profile:0x89c7568
# #additional_prefs=
# {"javascript.enabled"=>false, "webdriver_firefox_port"=>7055},
# #extensions=
# {:webdriver=>
# #<Selenium::WebDriver::Firefox::Extension:0x89c6488 # !> previous definition of proxy= was here
# #path=
# "/home/kirti/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/firefox/extension/webdriver.xpi",
# #should_reap_root=true>},
# #load_no_focus_lib=false,
# #model=nil,
# #native_events=false,
# #secure_ssl=false,
# #untrusted_issuer=true>
Once your browser window will be opened up through the above code,then check the Preferences from Edit->Preferences->content,then you would see that Enable JavaScript: option is unchecked.