EvanAgee / vuejs-wordpress-theme-starter

A WordPress theme with the guts ripped out and replaced with Vue.
https://vuewp.com/
1.6k stars 281 forks source link

No content displaying #122

Open patgas opened 3 years ago

patgas commented 3 years ago

Hello, after installation I had a problem with all.filter not being a function, after some tweaking in settings.js and router I eliminated the console errors. Now my console is clear but there is still no content ( no homepage, no blog, can't even see the Hello world post via the "View" button ) Does anyone have an idea why is that?

patgas commented 3 years ago

I managed to fix it, at least partially.

When you encounter the same problem and you are running a local env like XAMPP ( as I do ), your URL looks something like "https://localhost/wordpress", therefore in router/index.js your paths should look like this path: '/wordpress' and not like the default '/'.

This fixed the homepage ( the default one ) and the posts for me, I'm still having a struggle with displaying the Page ( eg. Sample Page ), I'm only seeing Loading... and nothing never loads ( no console errors ). https://prnt.sc/wlxog3 Still working on this, I will update if I learn anything

patgas commented 3 years ago

It seems that Pages are treated as Posts therefore the Vue methods can't handle the content ( I'm basing that on WP/Vue loading the Post.vue template instead of Page.vue ). post variable is never set to true ( or just not false ) and Page view is stuck in the infinite loading screen.

Correct me if I'm wrong about this :D

Cobb-Zhang commented 3 years ago

I have encounted the same error. Maybe you can check the src/settings.js,the API_BASE_PATH should also add the base link like '/wordpress'