wbrowar / craft-guide Goto Github PK
View Code? Open in Web Editor NEWGuide authors around the Craft CMS Control Panel with pages, widgets, and Twig snippets.
License: MIT License
Guide authors around the Craft CMS Control Panel with pages, widgets, and Twig snippets.
License: MIT License
Great plugin, very helpful, but unless I'm mistaken, there's one obvious thing missing after a few minutes of using the plugin: being able to assign a guide to multiple places.
I have some general guides about "generic principles" that I'd like to have on different sections edit pages, and the only way I can find of doing this is by cloning the guide, which defeats the purpose. It would be really nice to have multiple instances of a single guide so we can show it and access it from different places.
Did I miss something?
Replacing "Unused Guides" by "Available Guides" would do the trick.
-- JL
I'd like to be able to disable creating/editing guides from the CP.
I'd also like to be able to disable the "Admin Log". Which would hide it from the sidebar and widget area.
When installing this plugin with Composer 1, the following deprecation notice is output:
Deprecation Notice: Class
wbrowar\guide\assetbundles\Guide\GuideAsset
located in./vendor/wbrowar/guide/src/assetbundles/guide/GuideAsset.php
does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0.
Composer 2 was released on October 24, and is now the default version that will be installed, so it’s critical that this gets resolved ASAP, or people will start getting Class not found
errors.
To fix, run the following command:
> git mv src/assetbundles/guide src/assetbundles/Guide
Then commit your change and tag a new release.
(Note that you must use the git mv
command, as Git tends to not notice case-sensitive file renames otherwise.)
I've ran through the steps and imported from github the templates/assets/guides, however nothing appears to show in the organizer. I've also tried creating a guide and using an existing template and it doesn't appear to error but nothing is showing up in the organizer. I can see the database records getting created in the guide_guides
table and there is a record in the guide_organizers table, however the organizer view just shows that there is nothing in the Available Guides.
I'm at a loss on what to fix, as it doesn't appear to be generating any warnings/errors (confirmed in the logs) and I can see that the organizer node has json in its organizer-config property. So it looks like all the bits are working and the json is valid, but it's failing somewhere to show me any guides. And trying to debug the minified js is a bit too hard (without access to the original js).
Any help would be appreciated.
I tried using the guide plugin, but whenever I pushed an update (and the project-config synced) all my guides were gone. Still in the database, but not shown in the CMS.
I assume the plugin hasn't been made compatible with the new project-config setup?
Hi,
I get the following error when I try to convert guide templates into an editable user guide in the control panel
The requested URL /admin/guide/new/_guide/assets was not found on this server.
I have an initial set of docs in my templates/_guide
folder, and I want to convert them for editing within the control panel for my client,.
The layout of the Organizer gets squished in smaller screens. Addressing this with these two things:
Sections Subnav link entries do not function. The href populates on both the element and the link in the subnav, but it does not jump to the heading.
I updated to 1.3.0 and am getting this error. I have not edited anything.
When trying to import a guide into a new environment (with an empty guide), the import fails on https://github.com/wbrowar/craft-guide/blob/master/src/controllers/ImportExportController.php#L171 with error: "Call to a member function toArray() on null"
Hey Will,
Digging the new features so far!
Getting the following log if devmode is off which breaks editing and adding guides.
Twig\Error\SyntaxError: Unknown "dump" function. in /var/www/vendor/wbrowar/guide/src/templates/edit.twig
Thanks!
[error][yii\base\ErrorException:8] yii\base\ErrorException: Undefined index: section in .../vendor/wbrowar/guide/src/Guide.php:282
Hey :)
It will be great if posiblle that we can load.. Guides in slideouts..
https://dev-diary.newism.com.au/posts/creating-craft-cms-slideouts.html
After updating from 1.4.0
to any 2.0.0+
version of the guide, the following error message is returned:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'craft3_20191021.craft_guide_organizers' doesn't exist
The SQL being executed was: SELECT *
FROM `craft_guide_organizers`
if I try to upgrade from guide 1.4.0 to guide 2.0.1 or the latest 2.1.2 or anything in between there is always a migration error showing up.
Exception: Undefined offset: 13 (/Users/michtio/dev/researchschoolsnetwork/craft/vendor/wbrowar/guide/src/migrations/m190703_015029_convert_user_guides.php:200)
#0 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/wbrowar/guide/src/migrations/m190703_015029_convert_user_guides.php(200): yii\base\ErrorHandler->handleError(8, 'Undefined offse...', '/Users/michtio/...', 200, Array)
#1 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/wbrowar/guide/src/migrations/m190703_015029_convert_user_guides.php(40): wbrowar\guide\migrations\m190703_015029_convert_user_guides->convertUserGuideToGuide()
#2 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/craftcms/cms/src/db/Migration.php(56): wbrowar\guide\migrations\m190703_015029_convert_user_guides->safeUp()
#3 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/craftcms/cms/src/db/MigrationManager.php(239): craft\db\Migration->up(true)
#4 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/craftcms/cms/src/db/MigrationManager.php(159): craft\db\MigrationManager->migrateUp(Object(wbrowar\guide\migrations\m190703_015029_convert_user_guides))
#5 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/craftcms/cms/src/services/Updates.php(225): craft\db\MigrationManager->up()
#6 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/craftcms/cms/src/console/controllers/MigrateController.php(265): craft\services\Updates->runMigrations(Array)
#7 [internal function]: craft\console\controllers\MigrateController->actionAll()
#8 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#10 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/yiisoft/yii2/console/Controller.php(148): yii\base\Controller->runAction('all', Array)
#11 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction('all', Array)
#12 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('migrate/all', Array)
#13 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/craftcms/cms/src/console/Application.php(93): yii\console\Application->runAction('migrate/all', Array)
#14 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('migrate/all', Array)
#15 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(craft\console\Request))
#16 /Users/michtio/dev/researchschoolsnetwork/craft/craft(22): yii\base\Application->run()
#17 {main}
Exception 'craft\errors\MigrateException' with message 'An error occurred while migrating Guide.'
in /Users/michtio/dev/researchschoolsnetwork/craft/vendor/craftcms/cms/src/services/Updates.php:233
Stack trace:
#0 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/craftcms/cms/src/console/controllers/MigrateController.php(265): craft\services\Updates->runMigrations(Array)
#1 [internal function]: craft\console\controllers\MigrateController->actionAll()
#2 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#3 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#4 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/yiisoft/yii2/console/Controller.php(148): yii\base\Controller->runAction('all', Array)
#5 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction('all', Array)
#6 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('migrate/all', Array)
#7 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/craftcms/cms/src/console/Application.php(93): yii\console\Application->runAction('migrate/all', Array)
#8 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('migrate/all', Array)
#9 /Users/michtio/dev/researchschoolsnetwork/craft/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(craft\console\Request))
#10 /Users/michtio/dev/researchschoolsnetwork/craft/craft(22): yii\base\Application->run()
#11 {main}
This makes it quite impossible to upgrade the old guide to the new one.
The documentation site's preview image is not what I'd expect.
https://guide.wbrowar.com/'s og:image
<meta data-n-head="ssr" data-hid="og:image" property="og:image" content="https://guide.wbrowar.com/preview.png">
points to
https://guide.wbrowar.com/preview.png
which is
Example result: sharing on Slack:
Would be nice for clients to be able to search within Guide to find something they need.
Maybe I'm doing this wrong, but I don't see a way to have a Guide in multiple contexts within the organizer. Ideally we'd have a generic guide that applies to multiple channels and want that to be a modal for each. Or, we'd want a Guide to show up as a modal, along with show up in our master guide. Guidance on how to do that currently, or is that an enhancement? Thanks, Will!
I cannot include any templates within another template when guide is rendering. Specifically happens when trying to add a guide to an entry.
It looks like saving a new User Guide from the CP fails if there are no nav items defined.
2018-11-28 11:44:40 [-][2][v88lro1v265o7assglfh8bbv3v][error][yii\base\ErrorException:2] yii\base\ErrorException: count(): Parameter must be an array or an object that implements Countable in /var/www/vendor/wbrowar/guide/src/controllers/UserGuideController.php:222
Relevant lines: https://github.com/wbrowar/craft-3-guide/blob/7fd6b09ffb9c976c2be85855f933852aa8f7a706/src/controllers/UserGuideController.php#L220-L222
Craft 3.0.26.1
PHP 7.2.5
Apache/2.4.18 (Ubuntu)
Hey there - looking through the license, it mentions payment and other things that don't seem to be connected to this project, but other parts seem like standard MIT. Did you mean for this project to have a non-standard license?
I've noticed this when dealing with asset mismatches, so tried to rebuild the asset tree, and didn't add the guide assets in yet.
What happens is that the login in the CP times out. "Can't find img x" from the ones that are needed for the guide.
There should be a fallback for this, if the images aren't found some kind of placeholder is shown in place...
We are sticking guides in the sidebars of certain pages, which works great! But any images we put in get shrunk to very small, obviously. Perhaps optional lightbox functionality for images, or else an overall modal option (like TL;DR but an actual modal instead of just show/hide)?
New version is much better to work with.. :)
Is it posiblle to add reorder of elements inside box.. now it eaiser to drag and drop elemets from left list
so Its better to have reorder . than moving elments from one box to other..
Can you add Snippet.. for Content stats.. like it was by default in content stats..
3 . Can you add template or snippet that show Guides like accordion or Togglle.
I tryed to show with css .. but do not work for some reason..
I think that much better for end user and it takes less space..
JSON should be copied to my clipboard
Nothing gets copied to my clipboard.
Console error:
globals.779c1e1a.js:1 TypeError: Cannot read properties of undefined (reading 'writeText')
at Proxy.copyText (guide-admin.0c2f1b3e.js:1:623577)
at Proxy.copyExportData (guide-admin.0c2f1b3e.js:1:623957)
at l.onClick.t..t. (guide-admin.0c2f1b3e.js:1:625881)
at Yr (globals.779c1e1a.js:1:56677)
at es (globals.779c1e1a.js:1:56756)
at HTMLButtonElement.n (globals.779c1e1a.js:1:64069)
Is it planned to support CraftCMS 4 and is there a Timeline?
Saving new Guides from the code editor errors out if you include any emojis. But emojis are very useful for documentation! 🎉
Error:
General error: 1366 Incorrect string value: '\xF0\x9F\x98\x84\x0D\x0A...' for column 'content' at row 1
We've used Structures in some unique ways - ways that we prefer to give editors context to before clicking into an entry.
We've sometimes provided notes and previews of how a section functions on the entry listing page, e.g here:
If Guide supported a modal function on these pages by adding a button, perhaps in the top bar, as it does on the individual entry pages that'd be great!
Evaluating the plugin on a Windows 10 system, there is a This guide seems to have moved.
error when trying to display a new guide (page template).
Looks like a full path like E:\craft\temp1\templates/_guide\award.twig
is stored in the db table instead of just award.twig
Obviously in
Line 467 in 82e155f
'/'
is used instead of DIRECTORY_SEPARATOR
Replacing that fixes the error.
Thanks
/Mel
I'm not entirely sure the process I took to add the guides, but everything should be set up correctly.
{% set foo = craft.assets.filename('index-dashboard.png').one() %}
<img src="{{ foo.url }}"/>
{{ craft.guide.component('image', { asset: foo }) }}
The image shows up fine, it's in my asset folder, but the guide component does not load. Any ideas?
This plugin seems to not fully being installed/initialized from the plugin store (or other environments via project config sync).
Guide shows up as a sidebar item and is shown as "Installed" under Settings > Plugins
Guide does not show up as a sidebar item and is shown as "Not Installed" under Settings > Plugins
If you select the menu option to install Guide under the Settings > Plugins list, it successfully installs and you're taken to a welcome screen for the plugin where you click a button to continue to setup. I did not see this welcome screen when installing from the plugin store, so seems maybe there's something necessary happening when the welcome screen is displayed and interacted with that's not happening on initial install.
Craft CMS: 3.7.12
Guide: 3.1.0
MySQL 5.7.32
After installing the plugin and importing the data and templates and ending up on the Organizer page, there's a box, Unused Guides, with four guides on the left and a box on the right, Guide CP, to drag guides to.
I can only drag one guide across to Guide CP. Is that because I'm using the free version of the plugin, or should I be able to add all four?
I have a multi-site setup and all entries (singles, channels, structures) report the same error when I disable them (this is the main disable, not "disable for site").
Argument 1 passed to craft\services\Sections::getEntryTypesBySectionId()
must be of the type integer, null given, called in
C:\web\testwebsite\vendor\wbrowar\guide\src\services\GuideService.php on line 241
Really nice plugin otherwise, cheers!
Congrats on a beautiful introduction to a plugin! I really like the slide-in animation of the welcome book and the setup section. Only a minor thing I thought I'd point out is that browser rendering often isn't great for angles, and this transform for the book makes the text look a bit fuzzy. Totally up to you, but thought I'd highlight it at least on Chrome, OSX:
I installed the Free edition of version 2.1.0 on Craft 3.2.10.
Then, I selected the default template path /templates/_guide
and an Asset Volume called Guide
. When I click on Go to the Guide Utilities page
button, I get following error on page http://example.test/admin/utilities/guide-export-import:
HTTP 404 – Not Found – yii\web\NotFoundHttpException
Invalid utility ID: guide-export-import
1. in /home/vagrant/sites/example/vendor/craftcms/cms/src/controllers/UtilitiesController.php at line 75
66676869707172737475767778798081828384
* @throws NotFoundHttpException if $id is invalid
* @throws ForbiddenHttpException if the user doesn't have access to the requested utility
* @throws Exception in case of failure
*/
public function actionShowUtility(string $id): Response
{
$utilitiesService = Craft::$app->getUtilities();
if (($class = $utilitiesService->getUtilityTypeById($id)) === null) {
throw new NotFoundHttpException('Invalid utility ID: ' . $id);
}
/** @var UtilityInterface $class */
if ($utilitiesService->checkAuthorization($class) === false) {
throw new ForbiddenHttpException('User not permitted to access the "' . $class::displayName() . '".');
}
$this->getView()->registerAssetBundle(UtilitiesAsset::class);
Screenshot: https://cl.ly/7cd97fcf2245
Any ideas what's going on? Thanks!
When the Guide plugin is installed along with the putyourlightson/craft-campaign
plugin, a server error occurs when trying to send a test email.
[error][craft\web\twig\TemplateLoaderException] craft\web\twig\TemplateLoaderException: Unable to find the template “guide/_partials/admin_globals”. in /chroot/home/templates/craft3/_emails/campaign/_layout.twig:463
craftcms/cms 3.7.63.1
putyourlightson/craft-campaign 1.24.1
wbrowar/guide 3.1.2
Currently the dashboard pages doesn't load for users with the Guide widget. We get the following exception:
yii\base\ErrorException: Attempt to read property "content" on null in /vendor/wbrowar/guide/src/services/Guide.php:79
Stack trace:
#0 /vendor/craftcms/cms/src/web/ErrorHandler.php(84): yii\base\ErrorHandler->handleError()
#1 /vendor/wbrowar/guide/src/services/Guide.php(79): craft\web\ErrorHandler->handleError()
#2 /vendor/wbrowar/guide/src/widgets/Guide.php(145): wbrowar\guide\services\Guide->getGuides()
#3 /vendor/wbrowar/guide/src/widgets/Guide.php(132): wbrowar\guide\widgets\Guide->_getGuideFromGuideId()
#4 /vendor/craftcms/cms/src/controllers/DashboardController.php(511): wbrowar\guide\widgets\Guide->getBodyHtml()
#5 /vendor/craftcms/cms/src/controllers/DashboardController.php(105): craft\controllers\DashboardController->_getWidgetInfo()
#6 [internal function]: craft\controllers\DashboardController->actionIndex()
#7 /vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
#8 /vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams()
#9 /vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction()
#10 /vendor/craftcms/cms/src/web/Application.php(293): yii\base\Module->runAction()
#11 /vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction()
#12 /vendor/craftcms/cms/src/web/Application.php(278): yii\web\Application->handleRequest()
#13 /vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest()
#14 /web/index.php(14): yii\base\Application->run()
#15 {main}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.