GithubHelp home page GithubHelp logo

Comments (26)

joshbedo avatar joshbedo commented on May 20, 2024 1

So i figured it out, i had the wordpress installation in a subdirectory and it messed up not only the api routing ( had to change API_BASE_NAME ) and it messed up the other routing. Just reinstalled it in the main htdocs directory for mamp and everything appears to be working fine now.

from vuejs-wordpress-theme-starter.

EvanAgee avatar EvanAgee commented on May 20, 2024 1

Thanks so much @joshbedo for tracking that down. I should note in the README that this project only works for root-level WP installs.

from vuejs-wordpress-theme-starter.

raisiqueira avatar raisiqueira commented on May 20, 2024

Hi, @robwelan. How are your permanent links? If you are using de WordPress default, change to any other permalink.

from vuejs-wordpress-theme-starter.

robwelan avatar robwelan commented on May 20, 2024

I've cycled through all permalink options except for custom. No change unfortunately. In case this helps, this is the html that is rendered between the header and footer sections:
<div class="page-content-wrapper"><!----></div>

from vuejs-wordpress-theme-starter.

robwelan avatar robwelan commented on May 20, 2024

I've worked out that adding '/development-vue' to my 'base' route (line 19 in index.js in the router folder) helps, as well as making sure 'plain' is not the chosen permalink. I've created a helper file to get window.location.pathname and I have added the result to router/index.js (modifying 'base' value) and also app.js modifying API_BASE_PATH). Working OK on MAMP.

from vuejs-wordpress-theme-starter.

raisiqueira avatar raisiqueira commented on May 20, 2024

So it worked? 🤔

from vuejs-wordpress-theme-starter.

robwelan avatar robwelan commented on May 20, 2024

Yes, with the change I've described (adding window.location.pathname if it does not equal to '' on the router/index.js and the app.js files)

from vuejs-wordpress-theme-starter.

raisiqueira avatar raisiqueira commented on May 20, 2024

Close issue, please 😄

from vuejs-wordpress-theme-starter.

EvanAgee avatar EvanAgee commented on May 20, 2024

Thanks so much @raisiqueira for helping out! +1 to awesomeness for you!

from vuejs-wordpress-theme-starter.

Ivanok avatar Ivanok commented on May 20, 2024

Hello, I'm trying to use the starter theme but i'm not able to render the body either.

Specifically, When I open the example Home page, the lists of pages and posts are not rendering on the page.

I tried making the changes as stated above, but the list of posts is still not rendering. I am able to access the api via browser so I'm not sure what is going on.

Thank you for making the starter theme and I hope that you'll be able to help me!

from vuejs-wordpress-theme-starter.

wester97 avatar wester97 commented on May 20, 2024

from vuejs-wordpress-theme-starter.

Ivanok avatar Ivanok commented on May 20, 2024

No console errors.

from vuejs-wordpress-theme-starter.

wester97 avatar wester97 commented on May 20, 2024

from vuejs-wordpress-theme-starter.

Ivanok avatar Ivanok commented on May 20, 2024

There is no 404 at all.

from vuejs-wordpress-theme-starter.

wester97 avatar wester97 commented on May 20, 2024

from vuejs-wordpress-theme-starter.

Ivanok avatar Ivanok commented on May 20, 2024

I don't see the posts requests on the list at all.

I did another clean installation of the theme files to ensure that I didn't make any changes. Attached is a screenshot of the network requests.

vue wp requests

from vuejs-wordpress-theme-starter.

wester97 avatar wester97 commented on May 20, 2024

from vuejs-wordpress-theme-starter.

Ivanok avatar Ivanok commented on May 20, 2024

@wester97 I uploaded the wrong attachment and changed it on the previous comment, am just now realizing that since you're responding via email that change did not get to you. Here is the correct attachment:

image

Thank you for the help.

from vuejs-wordpress-theme-starter.

wester97 avatar wester97 commented on May 20, 2024

Hmm, it seems that your requests for pages and posts aren't actually fired.

Do you see the placeholders for these sections on the homepage? For example: Home.vue loads pages-widget which ultimately should load the results of getPages into the data store, and thus into the view. You might have to trace that flow.

from vuejs-wordpress-theme-starter.

wester97 avatar wester97 commented on May 20, 2024

Hmm, please pull master and try again.

from vuejs-wordpress-theme-starter.

Ivanok avatar Ivanok commented on May 20, 2024

It works perfectly now!

Thank you.

from vuejs-wordpress-theme-starter.

dedanirungu avatar dedanirungu commented on May 20, 2024

I've worked out that adding '/development-vue' to my 'base' route (line 19 in index.js in the router folder) helps, as well as making sure 'plain' is not the chosen permalink. I've created a helper file to get window.location.pathname and I have added the result to router/index.js (modifying 'base' value) and also app.js modifying API_BASE_PATH). Working OK on MAMP.

I am having the same issue while trying to load pages. All pages are blank and only shows
<div class="page-content-wrapper"><!----></div>.

I have tried to follow the solution attached but I did not understand which files need to be changed.

@robwelan Kindly assist me with the steps guide on how to solve the issue.

from vuejs-wordpress-theme-starter.

dedanirungu avatar dedanirungu commented on May 20, 2024

Thank you @EvanAgee for reopening the issue.

Did you manage to get a solution on the issue. I have tried everything on my side and I did not manage to solve it. All route-view are rendering an empty div as shown below.

<div class="page-content-wrapper"><!----></div>

I will highly appreciate for your assistance.

from vuejs-wordpress-theme-starter.

joshbedo avatar joshbedo commented on May 20, 2024

Just downloaded the project and also having the same problem. I checked the network request and the API calls are returning the correct data and look fine but for some reason the body isn't rendering for posts/pages or home. I tried adding debugger in a few of the lifecycle methods but it wasn't getting hit not sure whats going on.

from vuejs-wordpress-theme-starter.

joshbedo avatar joshbedo commented on May 20, 2024

@EvanAgee no problem, yeah it would be cool if we could use subdirectories not sure what would be involved to make that happen.

from vuejs-wordpress-theme-starter.

EvanAgee avatar EvanAgee commented on May 20, 2024

I've just released an updated version of the project that will address many of these issues. Please note that the paths of the JS and CSS have changed so you may need to update your project. #48

from vuejs-wordpress-theme-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.