Skip to content
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

Update documentation to clarify the role of soberwp/controller #150

Closed
4 of 5 tasks
pkarjala opened this issue Jun 25, 2018 · 3 comments
Closed
4 of 5 tasks

Update documentation to clarify the role of soberwp/controller #150

pkarjala opened this issue Jun 25, 2018 · 3 comments
Assignees

Comments

@pkarjala
Copy link

Submit a feature request or bug report

Replace any X with your information.


Suggestion for new/improved documentation

(delete this section if not applicable)

What is the URL for the current documentation (if applicable)?

https://roots.io/sage/docs/theme-configuration-and-setup/
https://roots.io/sage/docs/blade-templates/

How can the documentation be improved?

Currently the soberwp/controller package is included with Sage 9. However, recent updates to Controller have broken functionality with regards to how filters are supposed to work in the Sage 9 documentation for passing data to templates (see https://roots.io/sage/docs/blade-templates/).

Through various discussions, it has been mentioned that soberwp/controller is an optional part of Sage 9. However, the documentation does not currently make this clear, or offer instructions on how to remove soberwp/controller should the user not desire to utilize it.

Furthermore, filters are promoted as the proper way to do data passing to templates in Sage 9, but they do not work as of this writing (see soberwp/controller#80) due to conflicts with soberwp/controller.

The documentation should be altered to clarify that soberwp/controller is optional, and can be removed by altering composer.json and running composer update && composer dump-autoload.

How will this benefit users?

Clarity in the usage of soberwp/controller and its optional use in Sage 9, as well as instructions on removing it if it is not desired in a base install.

Is there a related Discourse thread (please link them)?

https://discourse.roots.io/t/sage-9-passing-acf-data-via-blade-not-working/11641/
https://discourse.roots.io/t/passing-data-between-filters-and-templates-not-working/12718/
https://discourse.roots.io/t/using-controllers-or-filters-to-output-custom-fields/11812/

@retlehs retlehs self-assigned this Jun 25, 2018
@retlehs
Copy link
Sponsor Member

retlehs commented Jun 25, 2018

long overdue. thank you for making this issue

@pkarjala
Copy link
Author

pkarjala commented Jun 25, 2018

There will probably need to be additional documentation and/or changes to the default install, as removing the soberwp/controller line from the composer.json file and running composer update && composer dump-autoload will break a default Sage 9 install, due to references to functions in app/controllers/app.php in the base install:

resources/views/partials/page-header.blade.php line 2:

<h1>{!! App::title() !!}</h1>

@darrenjacoby
Copy link

darrenjacoby commented Jul 27, 2018

New release (2.1.0) of Controller will respect data passed in from add_filter, as per the Sage documentation. You can test on dev-master in the meanwhile.

soberwp/controller#80 (comment)

@retlehs retlehs closed this as completed Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants