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

Error on javascript console: $(...).sortable is not a function #1352

Closed
lyricnz opened this issue Jul 5, 2024 · 4 comments
Closed

Error on javascript console: $(...).sortable is not a function #1352

lyricnz opened this issue Jul 5, 2024 · 4 comments

Comments

@lyricnz
Copy link

lyricnz commented Jul 5, 2024

jquery.min.js:2 jQuery.Deferred exception: $(...).sortable is not a function TypeError: $(...).sortable is not a function
    at HTMLDocument.<anonymous> (https://heimdalldashboard:7990/js/app.js?id=5446aeb4aa754e641c77:633:18)
    at e (https://heimdalldashboard:7990/js/jquery.min.js:2:30310)
    at t (https://heimdalldashboard:7990/js/jquery.min.js:2:30612) undefined
@lyricnz
Copy link
Author

lyricnz commented Jul 5, 2024

The code in js/app.js like 633 is the first line of below.

  $('#sortable').sortable({
    stop: function stop(event, ui) {
      var idsInOrder = $('#sortable').sortable('toArray', {
        attribute: 'data-id'
      });
      $.post(base + 'order', {
        order: idsInOrder
      });
    }
  });

@lyricnz
Copy link
Author

lyricnz commented Jul 5, 2024

This is 2.6.1 btw

@lyricnz
Copy link
Author

lyricnz commented Jul 5, 2024

It looks like "sortable" is part of jquery-ui not jquery?
https://jqueryui.com/sortable/

Certainly adding the middle line below to ./resources/views/layouts/app.blade.php seems to have fixed the specific issue

        <script src="{{ asset('js/jquery.min.js') }}"></script>
        <script src="{{ asset('js/jquery-ui.min.js') }}"></script>
        <script src="{{ asset(mix('js/app.js')) }}"></script>

@lyricnz lyricnz changed the title Error on javascript console from Heimdall Error on javascript console: $(...).sortable is not a function Jul 5, 2024
@LinuxServer-CI
Copy link

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@LinuxServer-CI LinuxServer-CI closed this as not planned Won't fix, can't repro, duplicate, stale Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants