-
-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRM-17917 - Multiple fixes for fresh Drupal 8 installation #388
Conversation
When setting up a new build (e.g. `civibuild create d8-master`), I experienced crashes because this code calls a non-static function using a static syntax. (Specifically, `FileSystem::realpath()` tried to access `$this`, which was undefined, causing a crash.) `FileSystem::realpath()` looks like a thin wrapper which adds some special-case handling for D8 stream wrappers. I don't know anything about that edge-case, but it seems that using vanilla `realpath()` works better than misusing `FileSystem::realpath()`.
In my system with the current D8, activating Civi leads to a WSOD with the message "The website encountered an unexpected error. Please try again later.The website encountered an unexpected error. Please try again later." There appears to be an issue with handling the `{one}/{two}/{three}/{four}` trick for capturing subpaths. This uses a different trick for mapping all subparts of the path to `$extra`.
To setup a new D8 build, I'd suggest at time of writing:
|
Just noting to set up a new D8 Build now you just need
|
@@ -29,17 +29,9 @@ public static function create(ContainerInterface $container) { | |||
); | |||
} | |||
|
|||
public function main($args, $one, $two, $three, $four, $five) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@totten After i reverted this and applied a small patch to the crmNavigationMenu smarty function i got the civicrm menu reliably loading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seamuslee001 , clarification: was that reverting a specific line or all of 495e085?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also: is the D8 build 8.0, 8.1, or something else? (See core/CHANGELOG.txt
.) IIRC, I needed the patch in 8.1 to get any routes working...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@totten yes and i built this off 8.2 using the command above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clarification it was reverting your whole commit 495e085.
@totten any reason not to merge this? My position on 8.x at the moment is that we should merge a bit more agressively if it is to help get it going |
@eileenmcnaughton The only issue is that i built off 8.2 using buildkit and had to revert one of Tim's commits to make things work right. |
one of the commits in this PR? Not a good advertisement for it then... |
@seamuslee001 Can you tell me what "crmNavigationMenu smarty function " you had to patch, and how to get this to work? |
@totten , @seamuslee001 , @eileenmcnaughton Successfully installed CiviCRM into Drupal 8 without civibuild with the changes in the PR and the one mentioned previously. Drupal 8.2.5 Fixing this bit is good, and should be committed.... |
Thanks Mark, THe test that i needed was that the navigation menu url (that gets loaded by ajax) wasn't quite working as there was an // in instead of a language so i got a patch into core already which sets it to be en_US if not set otherwise. If you have tested and it works for you I'm happy for this to go through |
Ok I needed the changes in this PR to just get any CiviCRM page to load.... the page not found is for this path: (I've got the site in localhost, in a subdirectory of htdocs, no vhost entry, htdocs/drupal825) What should the path to the ajax menu callback be? |
Thanks for the feedback @jackrabbithanna. On my local D7, the path looks very similar -- in HTML, it's The route This suggests that the option See also: http://symfony.com/doc/current/routing/slash_in_parameter.html |
Merging as most comments suggest this is an improvement on the whole. |
I'll keep pushing on this in a new PR to get the menu going |
See detailed descriptions in commit messages.