Inconsistencies between Lando local and Pantheon dev

Some may know I have a rather unusual setup that requires symlinking the storage folder to the uploads folder to work with Pantheon. Although I have gotten this to work, there are inconsistencies between Lando running Sage 10 via yarn start locally, and what I see on Pantheon’s dev server. In theory, there shouldn’t be, unless the storage folder itself needs to be synced. Can someone let me know if that is true? I don’t know enough about the storage folder to really know if that is the issue.

The other inconsistencies I am seeing is that, for instance, @Log1x’s log1x/sage-directives package works fine in regards to using directives in blade templates for ACF fields, but using the directives from his other log1x/sage-svg package works locally, but not on Pantheon’s dev server. The work around is using the helper function, which works both locally and remotely on Pantheon’s dev server.

Another odd inconsistency is that, if I pull the latest db/code/files from Pantheon’s dev server, via lando pull and run a yarn start it seems to have cached old template code. I have to hunt around to find which file is cached in VSCode to merely hit ‘save’ with no changes, get webpack to rebuild and the browser reloads properly. Finally, my footer does not work locally, but shows up on dev perfectly fine. :man_shrugging:t2:

If someone can review my install process, and maybe point out if there was a flaw from the beginning causing this, or that if I blow out caching somewhere and restart X that might do the trick, I would really appreciate it. Really, any thoughts on this would be great. I absolutely am in love with this workflow aside these inconsistencies. I will also admit I am new to composer. I come from the node world and liken it to package.json and node_modules. There is something I am missing due to my lack of knowledge here, or at least that’s my guess. I am hoping other eyes will see something I am missing, or did not think of.

Thanks for looking!
Frank

Can someone help me understand what the storage folder is? I would like to attempt to delete everything in it to see if that clears up these issues but I am not sure what it does fully.

For example, if I run lando start and yarn start in the Sage 10 theme I get a page that looks like this with the <div id="main" ... and a ton of classes. This is not correct…

Matter of fact, here’s the blade template to prove the point…

Just an id. Now here’s the kicker, when I open that app.blade.php page, change nothing, but Save the file, Browsersync reloads the page correctly…

This is just one example. Others, like I mentioned above, I need to hunt around for the blade template to save no changes and it’ll update my localhost correctly.

Want another example? That h1 is supposed to have an SVG behind it. Let’s take a look at the browser again with yarn start running…

… and the blade template…

… now if I Command + S in VSCode (making no changes to this file) and go back to the browser…

I have to imagine no sane individual using Sage is dealing with this. :rofl:

Looking at the storage/logs folder I see acorn.log and atop is

[2021-02-18 21:18:31] production.ERROR: The /code/wp-content/themes/btc/bootstrap/cache directory must be present and writable. 

This tells me that I potentially need another step in my setup for Pantheon to symlink this cache folder to the uploads folder as I have done for the storage/folder. There is no mention of this bootstrap folder in the Sage 9 docs (duh I know but I looked), it’s not in the theme structure, and not much on the Acorn github about this folder needing write access.

I am not sure adding this symlink will automagically make Acorn happy or if I’ll need to do something else to kick start acorn. Maybe this is the source of my issues? I’ll report back after I’ve made this change, and updated my methods.

This topic was automatically closed after 42 days. New replies are no longer allowed.