bkwld / decoy Goto Github PK
View Code? Open in Web Editor NEWA Laravel model-based CMS
Home Page: http://docs.decoy.bukwild.com/
License: MIT License
A Laravel model-based CMS
Home Page: http://docs.decoy.bukwild.com/
License: MIT License
Page /admin/changes gives this error:
Method Bkwld\Decoy\Fields\Listing::__toString() must not throw an exception, caught ErrorException: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'opio.changes.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (SQL: select changes.id, CONCAT(first_name, " ", last_name) name from
changes
inner joinadmins
onadmins
.id
=admin_id
group byadmin_id
) (View: C:\Users\emin\Dev\opio\vendor\bkwld\decoy\views\shared\list_full_header.haml)
Laravel 5.4
Get logging in and out working
L5.3 broke the auth traits into a multiple ones and expects a seperate controller for resetting passwords. I think this should be mimic-ed to fix this.
https://github.com/laravel/laravel/tree/master/app/Http/Controllers/Auth
I'm getting this odd error for an unknown reason.
fopen(C:\Users\AIO2\Sites\DecoySample\public\/img/temp/home-marquee.jpg): failed to open stream: No such file or directory (View: C:\Users\AIO2\Sites\DecoySample\vendor\bkwld\decoy\views\elements\index.haml)
Maybe I'm missing something.
Hi,
is it possible to change the default button configuration from the wysiwyg editor?
I found the default configuration in:
https://github.com/BKWLD/decoy/blob/master/assets/js/wysiwyg/redactor.js#L20
But I didn't found a way to change the buttons.
In the Custom Fields Documenation there is a reference to http://docs.decoy.bukwild.com/wysiwyg but it's a dead link.
Maybe it's possible to use something like this:
Former::wysiwyg('body')->buttons(['bold', 'italic', 'link']);
or
Former::wysiwyg('body')->config(['buttons' => ['bold', 'italic', 'link']]);
Or is there already some magic to do this?
Thanks!
Hi
I have followed your quick-start instructions (http://docs.decoy.bukwild.com/quick-start), and everything seems to work until I go to /admin in the browser. The error comes up as follows:
Symfony\Component\Debug\Exception\FatalErrorException in d6b3bed5a9cf6ab689b4081dcf6401412aed3c3f.php line 0:
Method Illuminate\View\View::__toString() must not throw an exception, caught ErrorException: scandir(/home/vagrant/Code/Sites/thebackend/app/Console/Commands): failed to open dir: No such file or directory (View: /home/vagrant/Code/Sites/thebackend/vendor/bkwld/decoy/views/layouts/sidebar/_nav.haml) (View: /home/vagrant/Code/Sites/thebackend/vendor/bkwld/decoy/views/layouts/sidebar/_nav.haml)
The admin user has been set up in the database, and it seems to log me in, but the re-direct then throws the error.
My environment is Homestead
Thanks
@symfonycoda
@UKLaravel
Guys, I've set up an image type field in my config\decoy\elements.yaml
file:
seo:
label: SEO
help: SEO and social integrations
sections:
general:
ogimage:
type: image
label: Open graph (fallback and home):
value: /img/og_logo.png
On the first save, the image was moved to public\uploads\emelents
. Then... when the page refreshs, the file goes missing. Reload again, these 2 errors:
Exception in Element.php line 263:
All Element images must be stored in public/img
and
ErrorException in Element.php line 263:
All Element images must be stored in public/img (View: /home/vagrant/Code/mambo/vendor/bkwld/decoy/views/elements/index.haml)
I tried to find the issue myself, no success there. I think it's something in the getReplacementImage()
at Elements.php, ln 238
. It tests if the image has changed or something and deletes the old one. Maybe a false positive is making the code to delete the image around there.
Hi Guys, I know it's just create a migration to solve it. But it's the expected default behavior.
Anyways, here is the migration to update the table 2017_03_27_174854_add_locale_group_to_elements.php
:
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddLocaleGroupToElements extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('elements', function (Blueprint $table) {
$table->string('locale_group')->index();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('elements', function (Blueprint $table) {
$table->dropColumn('locale_group');
});
}
}
Are you using any TDD/BDD method? is there any dev branch?
After following the Quick Start tutorial to create a News Articles Listing, I get the following error when trying to see the list of articles:
FatalErrorException in ac61b2b66585f5333939165665079b0553efbf65.php line 0:
Method Bkwld\Decoy\Fields\Listing::__toString() must not throw an exception, caught ErrorException:
Class 'Article' not found (View: /Users/juan/Sites/completeps/vendor/bkwld/decoy/views/shared/list/_full_header.haml)
Hi,
with a fresh laravel project i see always the following error message even when iI try to update my own admin user (e.g. change firstname from "A" to "B")
Validation error: The field in conflict is highlighted below. Your submission was not saved.
It seems that there is something wrong in the validation :)
You may want to see : BKWLD/php-library#12
It would be great if all strings hardcoded into admin may be translated via lang* files.
Some of the strings are hardcoded in the index.js file (filters in listings, datepicker, etc).
I'm willing to pull my Brazilian Portuguese pack.
In the New Redirect Rule form, the sidebar shows the localization UI.
I couldn't find what is making this behavior to happen.
I expect this to break ( see #3 ) when adding L5.3 and L5.4 support, so we'll want these to help catch those errors.
See #18
Guys, we are actively searching for the problem since yesterday morning and found nothing so far... so we decided to open an issue. Is it an issue? We are still looking into it.
/admin/articles
Method Illuminate\View\View::__toString() must not throw an exception, caught ErrorException: Undefined variable: back
/admin/elements
fopen(/Users/Od3n/Documents/Git/decoy/public//img/temp/home-marquee.jpg): failed to open stream: No such file or directory (View: /Users/Od3n/Documents/Git/decoy/vendor/bkwld/decoy/views/elements/index.haml)
Sorry guys. We've became great fans of Decoy, and we are heavy using it. So we are bumping into some issues that you may not have noticed. Especially localization related issues.
Mostly so the look of the email is consistent and those look nice.
Getting:
Class 'Illuminate\Pagination\BootstrapThreePresenter' not found
Laravel removed the concept of presetner classes in 5.3
For #38
Suggestion:
Create a setter mutator for every protected $dates
in Base
that checks for changes before committing the model.
E.g.:
if ($val) {
if ($this->attributes[$attr] != $this[$attr]) {
$this->attributes[$attr] = $val;
}
}
Is there any way we can change the admin template, I'm working with metronic theme, as you know, it's a tricky theme that requires some work on it ?
So you could do window.decoy.config.allowUploads()
.
See #19 for some history
Hi,
i would ask, if it's possible to use an alternative authentication package?
Is it "just" changing the guard and the policy class in the config or do i have do change something else?
Thanks!
I've just installer Decoy on Laravel 5.4. (I'm really excited about Decoy!!)
I'm getting this error when logging in to the admin:
Method Illuminate\View\View::__toString() must not throw an exception, caught ErrorException: scandir(C:\Users\emin\Dev\opio\app\Console/Commands,C:\Users\emin\Dev\opio\app\Console/Commands): The system cannot find the file specified. (code: 2) (View: C:\Users\emin\Dev\opio\vendor\bkwld\decoy\views\layouts\sidebar\_nav.haml) (View: C:\Users\emin\Dev\opio\vendor\bkwld\decoy\views\layouts\sidebar\_nav.haml)
I'm on Windows, using latest Laragon (Apache, php 7.0).
Could this error be related to the Windows slash/backslash in file paths?
Laravel without Decoy works fine on my system.
Not sure if maybe I did not follow correctly, but after going through the Quick Start and then running a artisan config:cache, I go an error Call to undefined method Closure::__set_state() in /var/www/html/local.decoy.com/bootstrap/cache/config.php on line 354.
I removed the following from bootstrap/cache/config.php
'log_changes' =>
Closure::__set_state(array(
)),
and all worked as expected.
Thanks for OS'ing this!
I think these could be in their own test for file handling. Maybe the image stuff from CrudTest could be moved into this test too.
My first impression of the CMS is that's absolutely great. Unfortunately I expect soms resistance during the adoption process in our organisation due to the lack of a media library. Are there any plans for a media/image library? Or would it be easy to create one myself? Thanks!
Hi again.
Case we set a focal point in an image and call it using crop
, the image is cropped to center, losing the focal point referencial.
2 suggestions:
resizeByWidth(<width>)
and resizeByHeight(<height>)
so we could keep the original aspect ratio and use focal point info and have control of image size uploaded by client. Or even a method minDimensions(<width>,<height>)
which will resize the original respecting the minor dimension (width or height).I'm trying to figure out Former::checkbox, following the guide here: http://docs.decoy.bukwild.com/views
This is my view code:
!= Former::checkbox('category')->checkboxes(Bkwld\Library\Laravel\Former::checkboxArray('category', App\Project::$categories))->push(false)
The edit page is displayed correctly with the 4 checkboxes from the static array on the App\Project model, but when I try to save I get this:
Array to string conversion (SQL: update `projects` set `category` = inspiring, `updated_at` = 2017-04-21 18:28:49 where `id` = 1)
Am I missing something?
What does ->push(false)
mean?
Laravel 5.4, PHP 7.0, MySQL 5.7
I am planning to store all my app's assets on S3 and not on the local filesystem. I made my default filesystem S3 in the filesystems.php config file; however, when I upload a file for a post, etc, it is still saved on my local storage folder and not on my designated S3 folder. Am I missing something? or S3 is not supported for assets.
Trust to the ConvertEmptyStringsToNull
middleware to converty empty string to null rather than that PHP Library method.
The method localizableLocales() of Localize class is generating an error because Laravels query method "lists" returns a collection, not an array.
Classes\Input\Localize.php, ln 93
Suggested code:
public function localizableLocales() {
return array_diff_key( // Keep only locales that don't exist in
Config::get('decoy.site.locales'),
array_flip($this->other()->lists('locale')->toArray()), // ... the locales of other localizations
[$this->item->locale => null] // ... and this locale
);
}
Also, all translatable models should have a title() method?
In _localize.haml, ln 21
it expects that the model have it:
%a(href=DecoyURL::relative('edit', $model->getKey()))!=$model->title()
And in views\shared\form\display\_locale.php, ln 22
:
$label = "<span class='locale-label'>{$label} - Localized as <a href='".DecoyURL::relative('edit', $sibling->getKey())."'>".$sibling->title().'</a></span>';
So we had to do this:
/**
* Hopefully this is temporary. See: _localize.haml, ln 21
*
* @return string
*/
public function title() {
return $this->title;
}
Isn't preferable that this is an attribute like ->adminTitle
(getAdminTitleAttribute()
in Base
class)?
Suggested code for _localize.haml, ln 21
:
%a(href=DecoyURL::relative('edit', $model->getKey()))!=$model->adminTitle
and for views\shared\form\display\_locale.php, ln 22
:
$label = "<span class='locale-label'>{$label} - Localized as <a href='".DecoyURL::relative('edit', $sibling->getKey())."'>".$sibling->adminTitle.'</a></span>';
Make sure creation and management of admins still works. I think these are more at risk that other things because of L5.3 changes to auth.
It seems like a Model's public attribute, when getting put through the Bkwld\Library\Utils::nullEmpties is nulling false values. So I am getting the following when attempting to set public to false via the list toggle.
Integrity constraint violation: 1048 Column 'public' cannot be null'
The comments from the nullEmpties method seem to suggest numeric 0 is intentionally being excluded. Is the public boolean getting casted to true/false along the way?
Hi guys,
How can we move it from CSS so we could localizate it?
First time on login.
"php": ">=5.6.4",
"laravel/framework": "5.3.*",
"bkwld/decoy": "^5.2"
FatalErrorException in Login.php line 17: Trait method hasTooManyLoginAttempts has not been applied, because there are collisions with other trait methods on Bkwld\Decoy\Controllers\Login
When cycling through filters in search, if you change from a date field to a new field of any type, the date field isnβt removed from DOM.
Thanks for sharing this package! I've been looking forward to playing around with it these last few days. Unfortunately I've stumbled across some quirks before completing the quick start steps.
Firstly, could you please separate the example project and the documentation into their own repository? Both the example and the documentation are greatly appreciated, but their inclusion in the Decoy package is causing some problems.
Using PHPStorm I'm now getting warnings all over the place regarding to duplicate classes, resulting from the Laravel example project included in the Decoy package. Unfortunately PHPStorm does not seem to allow me to ignore the folder for autocompletion unless I ignore the entire Decoy package.
Secondly, the size of my project effectively doubled due to the near 30 MB of documentation included in the package. One of the gif assets takes up about 11 MB all by itself. The documentation is certainly valuable and the animation is informative, but doubt it should be part of the production deployment package. It caused a timeout during my initial deployment.
Thanks!
Confirm that the wildcard event listeners in the ServiceProvider still work.
From upgrade guide:
Wildcard event handlers now receive the event name as their first argument and the array of event data as their second argument. The Event::firing method has been removed:
What's the best way to change the base url from /admin/* to say /cms/* ?
I already have an admin panel and not sure how deep the code goes that has hard-coded values etc.
I am creating a photo gallery and have a dropzone upload on the gallery edit page. My dropzone instance is attempting to make a POST request (/admin/photos) to my Photos controller to create a new Photo resource, but it appears that the Router is redirecting to galleries/{id}/edit. I also tried creating a custom route /admin/galleries/{id}/photos (based on instructions in docs) based on my dropzone url, but was running into a 'You must login first' error. Any thoughts?
Hi,
when filtering the existing changes with something like this:
I can click on the "New" button... this produces the following:
InvalidArgumentException in FileViewFinder.php line 137:
View [changes.edit] not found.
I think, to add a change manually makes no sense.
Maybe there is already something like this to disable a "Add new" functionality on a listing.
protected $createable = true/false
Image related issues:
Include images and files
is checked.Compare
locale radio checked, the tooltip image is broken.Is there a way to add multiple images to an image field? If not, what it would be the best way to accomplish this?
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.