Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WYSIWYG captions tab broken after re-ordering page images #104

Open
dgdsp opened this issue May 15, 2014 · 3 comments
Open

WYSIWYG captions tab broken after re-ordering page images #104

dgdsp opened this issue May 15, 2014 · 3 comments
Labels

Comments

@dgdsp
Copy link

dgdsp commented May 15, 2014

Hei,

when first attached images are re-ordered and then a WYSIWYG caption is edited AND when a WYSIWYG caption is edited twice, the editor tab breaks with:

Uncaught TypeError: Cannot read property 'split' of undefined page-image-picker.js?body=1:168

Any idee how to fix this?

[gem versions refinerycms 2.1.2 and refinerycms-page-images 2.1.0]

screen shot 2014-05-15 at 14 06 42

@prokopsimek
Copy link
Contributor

It happens me too...

Step by step:

  1. add image > select image > insert
  2. edit caption of this new image > submit new caption
  3. add next image > select image > insert causes error

Gemfile

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.0'
# Use mysql as the database for Active Record
gem 'mysql2'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring',        group: :development

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'

  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'
end


gem 'refinerycms', git: 'https://github.com/refinery/refinerycms', branch: 'master'
gem 'refinerycms-i18n', git: 'https://github.com/refinery/refinerycms-i18n', branch: 'master'

gem 'quiet_assets', :group => :development

# Add support for searching inside Refinery's admin interface.
gem 'refinerycms-acts-as-indexed', ['~> 2.0', '>= 2.0.0']

# Add support for Refinery's custom fork of the visual editor WYMeditor.
gem 'refinerycms-wymeditor', ['~> 1.0', '>= 1.0.6']

gem 'seo_meta', git: 'https://github.com/parndt/seo_meta', branch: 'master'

gem 'paper_trail', git: 'https://github.com/airblade/paper_trail', branch: 'master'

gem 'refinerycms-settings', github: 'refinery/refinerycms-settings', branch: 'master'
gem 'refinerycms-page-images', github: 'refinery/refinerycms-page-images', branch: 'master'

gem 'refinerycms-home_items', path: 'vendor/extensions'
gem 'refinerycms-products', path: 'vendor/extensions'
gem 'refinerycms-illustrations', path: 'vendor/extensions'

updated not (24/02/2015 10:50am)

page-image-picker.js:168 Uncaught TypeError: Cannot read property 'split' of undefined page-image-picker.js:168

source error line page-image-picker.js:168:

var parts = $(input).attr('name').split('_');

@prokopsimek
Copy link
Contributor

@parndt Any ideas?

@parndt
Copy link
Member

parndt commented Mar 11, 2015

I guess it can't find a name attribute on whatever is found by $(input) (which might be an empty jQuery collection)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants