Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

jQuery error when trying to edit a post #79

Open
emmastone9 opened this issue Feb 3, 2018 · 5 comments
Open

jQuery error when trying to edit a post #79

emmastone9 opened this issue Feb 3, 2018 · 5 comments
Labels

Comments

@emmastone9
Copy link

Summary

Write a post, save it and then go to admin/posts, try to click on any post, nothing happens.
The following error gets displayed in developer console.

lib.bundle.js:120 Uncaught TypeError: $(...).selectable is not a function
at HTMLDocument. (lib.bundle.js:120)
at f (lib.bundle.js:80)
at d (lib.bundle.js:80)

Additional info

  • Postleaf version: using master
  • Node version: 0.7
  • Affected browsers: chrome
  • Operating system: mac os.
@claviska
Copy link
Member

claviska commented Feb 4, 2018

What steps have you taken to build Postleaf?

@emmastone9
Copy link
Author

Here are the steps:
git clone https://github.com/Postleaf/postleaf.git
git clone https://github.com/Postleaf/empower-theme.git themes/empower-theme

Copied .env.example to .env and added localhost

vim package.json
edited and saved as per #78 (comment)

npm install
sudo npm install -g gulp-cli
gulp build

node app.js

The app launches fine and I am able to make a post, however, start getting jQuery errors on other interactions as mentioned above.

@emmastone9
Copy link
Author

Here's a fix tha worked for us, YMMV..

gulp build

The above command ends up updating assets/js/lib.bundle.js leading to jQuery errors.
after the build is complete, just run the following command:

curl https://raw.githubusercontent.com/Postleaf/postleaf/master/assets/js/lib.bundle.js > assets/js/lib.bundle.js

i.e. overwrite the lib.bundle.js from the master, this fixed the above problem.

@claviska probably has a much cleaner way :-) , until then, the above fix should work.

@claviska
Copy link
Member

claviska commented Feb 5, 2018

I have a feeling this has something to do with the latest update to the selectable plugin. You could try forcing the previous release in package.json. Not positive until I have time to test this out though.

@A7pr4Z
Copy link

A7pr4Z commented Aug 20, 2018

Pinning claviska/jquery-selectable to 1.0.6 seems to fix the issue.

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

No branches or pull requests

3 participants