-
Notifications
You must be signed in to change notification settings - Fork 24
Skeleton layout fundamentally broken. ABSPATH already set. #579
Comments
@crazyjaco Thanks for the report. I will check on this in the next few hours and get back to you with a solution. |
still troubleshooting.
That gets me the correct project wp-config-{host}.php file loading. I'm breaking further along now, but it seems to be much further in the bootstrap. |
@crazyjaco I am booting up a new setup to debug it now. |
@crazyjaco BTW, I have worked on this to replace the rats nest that is typical |
Thanks Mike! Appreciate it. Thats an interesting repo. I'm going to have to give a closer look when I get a chance. |
@crazyjaco I was working on a critical project and could not take the time away. That said, I have decided to pull back from client work and focus 100% on (finally) getting the successor to WPLib Box out the door. Have you signed up to our Slack? In case you have questions? |
@crazyjaco Can you try this one as an candidate for our next release? https://gist.github.com/mikeschinkel/6db474d6e6ac1b4b2aa6071843a6b264 |
Hey @mikeschinkel, Just getting back to this. That gist seemed to work. I can get to the admin login screen for wp-admin. Which means it found my imported database with a custom table prefix. So thats a good start. I'll check out the slack. |
You (currently) must have ALSO, I had to update the Gist to support WP CLI. I did not test with it earlier. |
looks like i can access wp-cli, but it can't find the right wordpress install. It using the wrong table prefix (wp_ instead of my custom one). i have my wp-config.php in the root of www. www
|
@crazyjaco That looks like a WP CLI configuration error? (I don't use WP-CLI that often.) |
I think I see the issue. |
@crazyjaco Did you get the latest Gist I posted in the past hour? I had to fix that |
Yes. |
oh wait. I'm seeing i need to create a HOSTNAME file to hardcode it since its different. |
I created the file.
Directory Structure now:
|
@crazyjaco I intended Is your hostname |
It is. I tend to think using a custom hostname and wp-cli at the same time would not be that rare, but I'm not exactly doing out of the box stuff like most users/agencies. So maybe it isn't that common? |
@crazyjaco Damn, there was a typo in the code. Let me update the Gist. |
I updated the Gist. Try it? |
I am on a call so multitasking. |
Grabbed your update. |
Doing some testing. The user list command works, at least. I'll let you know what I find. |
Couple things:
In addition to that, I might have hit a wall. Is there some way for me to map my box's 'content' folder to a local folder via the project.json file? |
@crazyjaco So I updated the Gist yet again, this time to deal with As for your wall, yeah I think at the moment our architecture does not envision you are going to symlink directories from outside your project root. It is certainly something we can consider adding if the use-case is common enough. Can you explain why you are doing it this way rather than having a repo with all your code and Composer to manage the parts you BTW, we will soon (~10 days) have an alpha out for our replacement for WPLib Box. It won't require Vagrant and will have lots of other things going for it. We've kinda stopped "polishing" WPLib Box as we have been working on it as its architecture will enough us to do much more than the Vagrant architecture of WPLib Box. While still in alpha and still in beta we are not going to make it publicly available but if you are interested I could include you in our list of testers. DM on our Slack if you are interested. |
The command I ran was
Shouldn't be triggering any email functionality to my knowledge. It seems like I got things working by eliminating the symlink and replacing it with a vagrant synced folder that I set in the Vagrantfile. I haven't seen an easy enough workflow using Composer for daily team development on a full wordpress ecosystem. We're slowly moving this in that direction, but not with a lot of motivation. Do you have any references for good composer workflows? |
@crazyjaco Interesting. Well that error was definitely in the As for good Composer workflows, I have been thinking about blogging about that for a while. You might have given me some motivation to do so. Any chance you want to share with me the issues you have had with it thus far to make sure I address them, here or in Slack? |
Can do. Might try to do it in slack. |
FYI, tried that updated wp-config (4th revision) with wp-cli and it couldn't find my db table prefix. |
Hello. I am trying to see if this box will work with my company's WordPress theme.
I am using a Skeleton layout to abstract my content folder from core.
I am noticing the following lines in the wp-config.php in the www folder:
Unfortunately, it will never enter this logic because ABSPATH will always be defined before the wp-config.php file is loaded.
ABSPATH is set in the wp-load.php just before it then loads wp-config.php.
This means a skeleton layout will always break. :\
Even if I changed the above snippet to:
This wouldn't work either because then you are setting a constant twice, which will throw a php error.
There is no way to use a skeleton layout using a wp-config.php file within a separate wordpress install.
The wp-config.php needs to be in a parent directory of core.
This a fundamental architecture problem and I'm not sure there is a quick solution, not having worked in this box for more than a few hours.
I get further by deleting all the wordpress files in the root of www except the wp-config files and navigating to
my.hostname/wp
, but then there is a problem in the wp-config.php trying to get the correct hostname.The text was updated successfully, but these errors were encountered: