Closed maxlysenko closed 8 years ago
develop
before refactoring means? Which commit are you on?
i just tested really quick and got another error with the fallback stuff. So definitely an issue that needs to be looked at.
Wondering when this regression happened
Hello,
By refactoring I mean the series of commits (e.g. b86a9ef564cae7240b32520218993a74b32f05e1, 7edb382d3731b18a322efb7b8166eb6948e59e4a, 1f49bee5f266289b0b3daa6e52051c56e0d40e6c, 7051dad34c8a77085cc2e19546c1fdf0e8570e37, 6f91e273898e19d1a9412a250c039c158c7b36f9, 1d2c4ea2a65dc94769df7754cca29fd6db7a3bc3) for Grav.php
from #745 which I think was merged in 9eeb4c15accf5117691c3ac17a9786dc0f68a0f6.
So "before refactoring" it is any commit before this merge.
In particular for my tests I've used commit a8f4092ac3bf20756846ee5c5106fa5ef2d5a44b as "before refactoring" and the latest commit 6124f71d6e71dad4f7f85fc4f48d39db256c7934 as "after refactoring".
Replicated. I wasn't getting this issue previously because I didn't merge the latest develop
changes in the feature branch I was working on.
the problem I get is related the fallbackUrl() method in Grav object needs to be changed from protected
to public
. You are getting a different error from what I saw, but ultimately it could be related.
Here's that change: https://github.com/getgrav/grav/commit/dc121e9ef2b4c674613acf6dbe667755a0296633
Please test with this and let me know if your issue persists.
With dc121e9 all went back to normal. Files are loaded fine again. Thank you Andy and all Grav team for your work, for always quick response on issues and for the great CMS!
cool :) Closing!
If a page has files accessed via routes, the files are not loaded. Loading those files directly throws an error:
Whoops\Exception\ErrorException thrown with message "call_user_func_array() expects parameter 1 to be a valid callback, no array or string given"
For test example I have two folders:
grav_test1
andgrav_test2
. The first one containsdevelop
before refactoring, the second one contains the latestdevelop
. Both with default Antimatter theme. Content of theuser
folder is the same in both folders: I puttest_image.png
file into thepages\01.home
folder (next to thedefault.md
file). Then in thedefault.md
file I added the following line referring test image:--- title: Home --- <img src="home/test_image.png" alt="Test Image"> # Grav is Running! ...
Then load the pages in browser: local.dev/grav_test1/ --> image is loaded fine on the page local.dev/grav_test2/ --> image is not loaded
When trying to access files directly: local.dev/grav_test1/home/test_image.png --> image is loaded fine local.dev/grav_test2/home/test_image.png --> throws an error
The same is true for any files accessed via routes.