No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Quasar based WordPress plugin running into snags

    Help
    1
    2
    320
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sharpsoft last edited by

      I’m trying to use a quasar project as a wordpress plugin and I’m having some trouble.

      I have it built and put in a plugin subdirectory, the assets seem to load from my registered plugin. But then I see this error thrown in the console.

      Uncaught TypeError: Cannot read property 'classList' of null
          at body.js:49
          at _ (body.js:83)
          at Object.install (install.js:27)
          at Function.t.use (vue.runtime.esm.js:5101)
          at Module.2f39 (import-quasar.js:19)
          at i (bootstrap:89)
          at Object.0 (app.6d594680.js?ver=0.1:1)
          at i (bootstrap:89)
          at r (bootstrap:45)
          at Array.t [as push] (bootstrap:32)
      

      The first line in question is: document.body.classList.add.apply(document.body.classList, cls) , where document.body appear to be undefined.

      This is using

      Build mode........ spa
      Pkg quasar........ v1.0.0-rc.3
      Pkg @quasar/app... v1.0.0-rc.4
      Debugging......... enabled
      

      I’m afraid that I’m a little out of my depth in trying to figure this one out, it seems like something is missing or is getting run out of order. But all the assets seem to load fine and in the order I put them in there. I don’t really understand the innards here.

      I really don’t want to yank quasar and run vanilla vue to get this project out the door, so I’m looking for a solution or potentially documentation that may help me.

      1 Reply Last reply Reply Quote 0
      • S
        sharpsoft last edited by

        Solved my own issue. This occurs when I put the <script> load tags before the intended injection <div>. Move them to the footer and it works.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post