-
Notifications
You must be signed in to change notification settings - Fork 573
Crash on your blog page if you include /home in the path #1235
Comments
@14u2ponder Thanks for spotting this one, have you tried version |
I'd like to but I don't know how to install 12.3 |
@CraigChilds94 have you not been able to recreate the issue? Also while I know you're busy is there anybody here that can show me how to install 12.3. I've asked several times to no avail. |
@14u2ponder Are the instructions on the front page not working for you? |
@TheBrenny the last time I tried to install it it didn't have the Vendor folder included, so it would not install. So I assumed that there was an upgrade procedure which the last time I tried to do that you had to replace the system folder and then import your database over. I don't know if 12.3 is either an upgrade or a standalone product is my point and maybe you have to use bowser to install it, which I don't really know a lot about bowser. So.... |
If you download Back to the main point of the issue though (😅)... This is going to sound like a really stupid question, but in your themes directory, can you confirm the you have a |
@TheBrenny I AM using a custom file for my homepage. page-home.php and in the meta I have home pointed to home. I also have a posts.php file that is pointed to post page. I re-named the slug "blog." You can see it here: deleted I am still working on the pages so they look broken, they aren't. It is just incomplete. |
So does that mean this issue is resolved, considering it was sounding like you made your blog with a slug of |
@TheBrenny I can see how it might seem that way. But actually, I was testing the fact that, in anchor, when you create a static home page with page-home.php your homepage can resolve to the slug of /home. Such as: redacted If you do this (and follow me here) and then type some gibberish after that: redacted you will receive a 404 error message. LIKE YOU ARE supposed to. However, if you type: redacted (or presumably PAGE, if you have not renamed your post page) this will break anchors 404 error system and you will get an uncaught exception. |
My thinking is that it SHOULD just 404 error it. Or maybe there could be a way to redirect it to /blog instead of /home/blog. But I don't really know how you guys want to handle this because honestly most people don't use the slug /home and would not need /home/blog to resolve. Me personally, I don't want or need the /home slug but I know it is a part of anchor. |
AAaaaaaahhhh.. I get it. I understand! I've backtracked what's going on, and it's because the conditionals on this line aren't quite working as they should. That's because we're testing for things and then having "hope". That's the best way I can explain it. Anyway, if you change that line to this:
then you should have it fixed. Give it a go, and tell me what happens! 😄 |
Okay, I will today a little later and I will post the results. Leave it to me to test something stupid, lol. |
Well, I am still on 12.1. I think it might be too much for me to switch over to 12.3 right now, and not sure it is too worth it yet. When I look at my site.php this is what I see:
|
A little bit upward I've identified how to upgrade a little easier than the manual method. I can only point you in the right direction and hope that I didn't screw up somewhere. |
Yeah, but I think it requires me to replace the anchor folder, because when I tried it, it locked me out of my site meta, so I figured that at the very least I would need to do something else. What i did was replace those two files like you said and went to my admin page and was looking for upgrade in site meta, but I got an error so I gave up, lol. The admin page worked, as far as it goes, but the site meta threw an error, so I don't know. |
@TheBrenny hey bren, I tried the update again: at first I was using update rather than upgrade. Once I used the correct file, I got this |
Ah true. You'll also need to replace `anchor/views/upgrade.php`. Sorry I
missed that one!
…On 31 Dec 2017 02:39, "14u2ponder" ***@***.***> wrote:
@TheBrenny <https://github.com/thebrenny> hey bren, I tried the update
again: at first I was using update rather than upgrade. Once I used the
correct file, I got this
[image: 2017-12-30]
<https://user-images.githubusercontent.com/4943529/34456027-d817ba5a-ed51-11e7-9e4b-0a610403fc71.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1235 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABbfK4hqDfKsT5Vj1O1c2AiJAHyJrwBEks5tFm43gaJpZM4Q8gjo>
.
|
@TheBrenny Sadly, the rabbit hole continues. Here is the error I get. Figure 1 is with the old status.php file. Figure 2 is the new status.php file. Same error. |
@TheBrenny Hey, I figured this out. I was copying and pasting the code into a notepad ++ file because I didn't see a clone button, and I added an extra space in my upgrade.php file at the top before <php line. Once I fixed that it worked. But I have a question, I see that when I clicked update it is running and I see it downloaded a folder: Anchor_update to my public_html, is it going to complete everything for me and how long does it take for that to happen? |
If you click update, it should do everything automagically. Should take no more than 10 minutes, and that's being generous. If you don't get any feedback, that's when I'd get a little bit concerned. Did you get anything from your page? |
@TheBrenny All it did was download a folder called anchor_update and I let it go for probably 20 minutes. It never did nothing else. And it kept saying updating... and the little anchor symbol was rotating. Nothing else happened. Maybe it has something to do with my server. I'm on hostgator, I don't know. |
Oooh. Now this one is interesting! I feel it requires a new thread, though... Either way, I'll ask a few questions in a sec, I just need to track down the code where things might be going wrong... |
@14u2ponder Can you open up the Dev Inspector (F12 on Chrome) and then click update? There should be something with a whole bunch of "|-|"s in it. It could be an object. Can you send through that? |
@TheBrenny I'll try it. Do you want me to post the results, in other words? |
@TheBrenny Actually, that was wrong I was using edge. Here is the screen for chrome. |
@TheBrenny here are some more screens |
What's the response tab on that XHR look like? |
@TheBrenny I think I sent that in the last image. It looks like it is waiting but the content was downloaded, see far right on the image above. |
@TheBrenny Another screen. |
It looks like the ZipArchive PHP extension isn't installed on your system. I'll see if we can drop the reliance on ZipArchive. |
Okay, thanks! |
@TheBrenny quick question. I think I can enable Archive_Zip (0.1.2) from my php pear packages. Is this what you are referring to? |
@TheBrenny well I tried it and it didn't work, so |
Summary
When creating a static homepage, anchor creates a slug to whatever you name it. "/home" for example.
If you have a blog or page page for your blog and you type:
www.example.com/home/blog or www.example.com/home/page depending on whichever you created anchor crashes.
Expected Behaviour
a simple 404 error page.
Actual Behaviour
This only happens when you exactly do the steps listed above. It won't happen if you type www.example.com/home/something_else. If you do that, anchor works fine.
Error Message
require(/home2/zsqr5wfq/public_html/themes/gravity/page.php): failed to open stream: No such file or directory
The error has been logged in /anchor/errors.log
Uncaught Exception
require(/home2/zsqr5wfq/public_html/themes/gravity/page.php): failed to open stream: No such file or directory
Origin
system/view.php on line 87
Trace
#0 /home2/zsqr5wfq/public_html/system/view.php(87): System\Error::native(2, 'require(/home2/...', '/home2/zsqr5wfq...', 87, Array)
#1 /home2/zsqr5wfq/public_html/system/view.php(87): require()
#2 /home2/zsqr5wfq/public_html/system/route.php(160): System\View->render()
#3 /home2/zsqr5wfq/public_html/system/router.php(152): System\Route->run()
#4 /home2/zsqr5wfq/public_html/system/start.php(46): System\Router->dispatch()
#5 /home2/zsqr5wfq/public_html/index.php(35): require('/home2/zsqr5wfq...')
#6 {main}
Setup
The text was updated successfully, but these errors were encountered: