Giter VIP home page Giter VIP logo

craft-guide's Introduction

Hi there 👋

craft-guide's People

Contributors

davidhellmann avatar internetztube avatar wbrowar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

craft-guide's Issues

Suggestion - Multiple instances

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

Fix Composer 2 compatibility

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.)

Idea

I think this would be great way to show.. Guide

Snag_96f94cc3

Can't create guides or see existing guides

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.

image

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.

3.1 compatible

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?

Can't convert template to editable user guide

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,.

Clean up Organizer responsive design

The layout of the Organizer gets squished in smaller screens. Addressing this with these two things:

  • Hide area description behind info icon (click to show description)
  • Reduce columns via media query

Sections Subnav does not work.

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.

Guide iframe CSS affects live preview

I think the Guide CSS is affecting live preview due to it's global iframe css. Specifically having iframe set to position: absolute; globally forces the live preview window to narrow considerably.
Screen_Shot_2019-07-26_at_1_37_19_PM

Static translations

  • Go through static labels and enable static translations in Twig.
  • Pass selected language into JS globals and pass statically translated labels in from Twig

Undefined Index error

[error][yii\base\ErrorException:8] yii\base\ErrorException: Undefined index: section in .../vendor/wbrowar/guide/src/Guide.php:282

craft_guide_organizers doesn't exist

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`

BUG: Migrations update from 1.4 to 2.0 or 2.1

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.

[FR] Reuse Guides

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!

Cannot include templates.

I cannot include any templates within another template when guide is rendering. Specifically happens when trying to add a guide to an entry.

Saving User Guide from the CP fails if no nav items defined

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)

LICENSE doesn't seem to match project

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?

BUG: When assets are missing - almost impossible to login to CP

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...

FR: Lightbox for images

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)?

Screenshot of one of our guides with the problem:
image

3.1.0 update info

New version is much better to work with.. :)

  1. 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..
    Snag_6f979a94

  2. Can you add Snippet.. for Content stats.. like it was by default in content stats..
    Snag_6f9b62f6

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..

[Bug] "Copy Guide Data" under utilities isn't working

Steps to reproduce

  1. Go to Utilities > Guide in my local site.
  2. Select a Guide to copy.
  3. Click "Copy Guide Data" button.

What I expect to happen

JSON should be copied to my clipboard

What happens instead

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)

[FR] Emoji support for markdown

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

[FR] Modal/Button Support on Entry Listing Pages

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:

Screen_Shot_2019-07-25_at_1_41_40_AM

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!

New Page Template Guides are not displayed on Windows

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

private function _getTemplatesFromUserTemplatePath():array
'/' is used instead of DIRECTORY_SEPARATOR

Replacing that fixes the error.

Thanks
/Mel

Images not appearing

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?

Guide not installing completely from plugin store or project config sync

Description

This plugin seems to not fully being installed/initialized from the plugin store (or other environments via project config sync).

Steps to Reproduce

  1. Install Guide plugin (Lite version) from the Craft Plugin Store

Expected Behavior

Guide shows up as a sidebar item and is shown as "Installed" under Settings > Plugins

Actual Behavior

Guide does not show up as a sidebar item and is shown as "Not Installed" under Settings > Plugins

Additional Information

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.

Versions

Craft CMS: 3.7.12
Guide: 3.1.0
MySQL 5.7.32

Only one guide can be dragged from Unused Guides to Guide CP

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?

Breaking error when editing a disabled entry

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!

Suggestion - Remove the rotation on guide/welcome

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:

image

404- Not Found: Invalid utility ID: guide-export-import

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!

Conflict with craft-campaign plugin

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

Versions

craftcms/cms 3.7.63.1
putyourlightson/craft-campaign 1.24.1
wbrowar/guide 3.1.2

Error on widget

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}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.