Jump to content

Processwire Ghost Blog Clone


clsource
 Share

Recommended Posts

@clsource I have installed the profile, however, I ran into two issues:

Quote

Notice: Undefined variable: canonical in /Users/guru/Documents/MAMP/playground/pwclone_loc/site/templates/views/default_view.php on line 4
MENU

And most importantly: the home page is the only one that works, otherwise I get "Not Found The requested URL /[ANY-PAGE-REQUESTED]/ was not found on this server." errors.

Why? Thanks in advance!

Link to comment
Share on other sites

See if the htaccess is active.

normally Processwire installer transforms htaccess.txt to .htaccess

About that line 

if (!$canonical) {
    $canonical = wire('page')->httpUrl;
}

maybe I should change to isset or not null?

  • Like 1
Link to comment
Share on other sites

Morning,

I shouldn't have installed anything right before going to bed :) – Of course, it was the missing .htaccess file which I renamed to .htaccess.txt, so I managed to only prefix it with the dot... no comment :P

About the !$canonical issue, I changed it to isset just to make sure I do not get any php error reporting, but to tell the truth I have not yet taken a look at the code at al. I will do so in the following days, because I'm interested in your Wire Render Pattern.

BTW, one more issue to solve: are you sure that ghost/ghost.writer123 should let me in? It does not work, login fails.

Link to comment
Share on other sites

Odd.

Well you can always change the admin password

$u = $users->get('ghost');
$u->of(false); 
$u->pass = 'your-new-password';
$u->save();

put that in the _init.php or another place. (later remove it when its done :) )

  • Like 1
Link to comment
Share on other sites

@clsource It's me again :) You might want to add a "Cover image" to the About page too, otherwise we get "...Trying to get property of non-object in..." notices. It might even be good thing to first test if an image is uploaded or not, but this might be overkill since – in the case of a real site –, no one should forget to upload an image which is an integral part of the overall design.

Link to comment
Share on other sites

4 hours ago, clsource said:

if (!$canonical) {
    $canonical = wire('page')->httpUrl;
}

maybe I should change to isset or not null?

I think it should be :

if (!isset($canonical)) {
    $canonical = wire('page')->httpUrl;
}

You intention was to use wire('page')->httpUrl when canonical is not set/defined, right? The only page where it is set is the Author's (author.php). If I'm not mistaken...

Link to comment
Share on other sites

Actually, I've found that the Author's page (such as /authors/lewis.carroll etc...) also generates varous Notices because of the "missing cover image" and also because of if(!$title), if (!$description) and others.

 

Link to comment
Share on other sites

  • 2 weeks later...

The thing I love about my Ghost blogs is the writing UI: Write Markdown on the left, and it appears fully rendered on the right. It also has the coolest while-you-write image upload utility I've ever seen.

That's not covered by pw-ghost, right?

Not having Ghost's writing UI isn't a deal-breaker, and I can't wait to try this out. If I could replace my Ghost blogs with a ProcessWire equivalent, I'd love to forgo the chore of maintaining a Node server!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...