-
Notifications
You must be signed in to change notification settings - Fork 920
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
reorder setup #223
Comments
Hi @AurelDragut , Could you be more specific, please? What's the problem you're facing? Cheers! |
Sure, @tabacitu, I made a fresh install of backpack, i added a CRUD for "sections", i changed "strict" from true to false (i remembered you once told me about it) and i tried to reorder the sections (not before setting those two lines about item to reorder, level and access). I have received the same error regarding the "item_id" that i wrote about here before. So i went on the documentation site to see if maybe i missed something and so i have seen this... so i did something like this (i even added my self "order" data but with no luck - the page column is empty because of missconfigured select column but that's another story) |
That all sounds good to me. That's the correct procedure. But you forgot to say what the error/problem is. Again :-)) So Here's a shot in the dark - have you used the CrudTrait on the model? <?php
namespace Backpack\MenuCRUD\app\Models;
use Illuminate\Database\Eloquent\Model;
use Backpack\CRUD\CrudTrait;
class MenuItem extends Model
{
use CrudTrait;
protected $table = 'menu_items';
protected $fillable = ['name', 'type', 'link', 'page_id', 'parent_id']; |
When i push Save after reordering i get the alert (Your order nas not been saved) and in the logs i see this: [2016-11-06 18:33:39] local.ERROR: exception 'ErrorException' with message 'Undefined index: item_id' in /home/menduit/public_html/vendor/backpack/crud/src/PanelTraits/Reorder.php:25 i checked the model file it looks like in your example |
Hmm...
Cheers! |
Okaaay. Now we're onto it. So it's an error in the |
I think it might be a server security issue, let me check with the hosting company and i will get back to you. (I see something about a xhr error when i click there) |
Wow, it seems it was a problem with the PHP version (i guess i had a previous version configured that they changed to 5.6). Sorry about this, at least i can hope that maybe someone else runs into the same situation and will find out about how to do it by reading this. |
Guys, i still have problems with the reorder feature.
I have setup strict to false in the mysql config, but i also saw something about some parent_id, lft, rgt, depth fields added to the model?!
The text was updated successfully, but these errors were encountered: