grav-plugin-admin: Making more pages below 2nd pages error
Hello, I want to ask, I just jump from Joomla to Grav. I also developing theme on it, anyway I have problem with adding pages below 2nd level, on 3rd level only on some pages, so when adding a pages, it always shows that the pages is error adding anyway.
I’ve tried for others page, it’s working, I just guessing something wrong with the moving, since the 1st parent and 2nd parent have set a custom slug or menu I guess, maybe the php function is wrong at there, anyway, I need help. Thanks NB : I Tried to change back to default of
the slug of the 2nd page and it can add a page under it, I don’t know what cause it, but seems strange

Hope the screenshoot help
NB : I also upload the mhtml, hope it also helping, at the zip Crikey! There was an error…zip
Whoops\Exception\ErrorException thrown with message "Argument 1 passed to Grav\Common\Page\Page::move() must be an instance of Grav\Common\Page\Page, null given, called in D:\xampp\htdocs\grav\user\plugins\admin\classes\controller.php on line 1210 and defined"
Stacktrace:
#13 Whoops\Exception\ErrorException in D:\xampp\htdocs\grav\system\src\Grav\Common\Page\Page.php:836
#12 Whoops\Run:handleError in D:\xampp\htdocs\grav\system\src\Grav\Common\Page\Page.php:836
#11 Grav\Common\Page\Page:move in D:\xampp\htdocs\grav\user\plugins\admin\classes\controller.php:1210
#10 Grav\Plugin\AdminController:taskSave in D:\xampp\htdocs\grav\user\plugins\admin\classes\controller.php:128
#9 call_user_func in D:\xampp\htdocs\grav\user\plugins\admin\classes\controller.php:128
#8 Grav\Plugin\AdminController:execute in D:\xampp\htdocs\grav\user\plugins\admin\admin.php:281
#7 Grav\Plugin\AdminPlugin:initializeController in D:\xampp\htdocs\grav\user\plugins\admin\admin.php:328
#6 Grav\Plugin\AdminPlugin:onPagesInitialized in D:\xampp\htdocs\grav\vendor\symfony\event-dispatcher\EventDispatcher.php:181
#5 call_user_func in D:\xampp\htdocs\grav\vendor\symfony\event-dispatcher\EventDispatcher.php:181
#4 Symfony\Component\EventDispatcher\EventDispatcher:doDispatch in D:\xampp\htdocs\grav\vendor\symfony\event-dispatcher\EventDispatcher.php:46
#3 Symfony\Component\EventDispatcher\EventDispatcher:dispatch in D:\xampp\htdocs\grav\vendor\rockettheme\toolbox\Event\src\EventDispatcher.php:23
#2 RocketTheme\Toolbox\Event\EventDispatcher:dispatch in D:\xampp\htdocs\grav\system\src\Grav\Common\Grav.php:449
#1 Grav\Common\Grav:fireEvent in D:\xampp\htdocs\grav\system\src\Grav\Common\Grav.php:280
#0 Grav\Common\Grav:process in D:\xampp\htdocs\grav\index.php:38
Environment & details:
GET Data empty
POST Data
header
array:19 [▼
"title" => "new toe"
"published" => "1"
"date" => ""
"publish_date" => ""
"unpublish_date" => ""
"body_classes" => ""
"menu" => ""
"slug" => ""
"redirect" => ""
"process" => array:2 [▶]
"routable" => "1"
"cache_enable" => "1"
"visible" => "1"
"append_url_extension" => ""
"order_by" => ""
"order_manual" => ""
"template" => "default"
"child_type" => "default"
"taxonomy" => array:2 [▶]
]
content
"let's change"
toggleable_header
array:15 [▼
"published" => "0"
"date" => "0"
"publish_date" => "0"
"unpublish_date" => "0"
"metadata" => "0"
"menu" => "0"
"slug" => "0"
"redirect" => "0"
"process" => "0"
"child_type" => "0"
"routable" => "0"
"cache_enable" => "0"
"visible" => "0"
"template" => "0"
"append_url_extension" => "0"
]
ordering
"0"
folder
"new-toe"
order
""
blueprint
"default"
admin-nonce
"8ae21ee48b62ff517a3aba039bf91dde"
name
"default"
route
"/home/test"
task
"save"
Files empty
Cookies
grav-site-f316ec0
"maeqqvtekm6tk0c95efo3ntcl4"
grav-site-f316ec0-admin
"29c8p3vb2ci2ci0ckl6f476b43"
__utma
"111872281.525271770.1462389652.1462389652.1462389652.1"
__utmz
"111872281.1462389652.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)"
_ga
"GA1.1.525271770.1462389652"
Session
admin_lang
"id"
user
User {▼
#gettersVariable: "items"
#items: array:9 [▶]
#blueprints: Blueprint {#1 ▶}
#storage: CompiledYamlFile {▶}
}
expert
false
messages
Message {▼
#messages: []
}
/sejawat
array:6 [▼
"title" => "sejawat"
"folder" => "sejawat"
"visible" => ""
"blueprint" => "pages/new"
"name" => "default"
"route" => "/"
]
lastPageName
"default"
lastPageRoute
"/fuck"
/fuck/anakku
array:6 [▼
"title" => "Anakku"
"folder" => "anakku"
"visible" => ""
"blueprint" => "pages/new"
"name" => "default"
"route" => "/fuck"
]
/blog/jadslja/new
array:6 [▼
"title" => "New"
"folder" => "new"
"visible" => "1"
"blueprint" => "pages/new"
"name" => "default"
"route" => "/blog/jadslja"
]
/fuck/new-toe
array:6 [▼
"title" => "new toe"
"folder" => "new-toe"
"visible" => "1"
"blueprint" => "pages/new"
"name" => "default"
"route" => "/fuck"
]
Server/Request Data
REDIRECT_SCRIPT_URL
"/grav/id/admin==/pages/fuck/new-toe"
REDIRECT_SCRIPT_URI
"http://localhost/grav/id/admin==/pages/fuck/new-toe"
REDIRECT_MIBDIRS
"D:/xampp/php/extras/mibs"
REDIRECT_MYSQL_HOME
"\xampp\mysql\bin"
REDIRECT_OPENSSL_CONF
"D:/xampp/apache/bin/openssl.cnf"
REDIRECT_PHP_PEAR_SYSCONF_DIR
"\xampp\php"
REDIRECT_PHPRC
"\xampp\php"
REDIRECT_TMP
"\xampp\tmp"
REDIRECT_STATUS
"200"
SCRIPT_URL
"/grav/id/admin==/pages/fuck/new-toe"
SCRIPT_URI
"http://localhost/grav/id/admin==/pages/fuck/new-toe"
MIBDIRS
"D:/xampp/php/extras/mibs"
MYSQL_HOME
"\xampp\mysql\bin"
OPENSSL_CONF
"D:/xampp/apache/bin/openssl.cnf"
PHP_PEAR_SYSCONF_DIR
"\xampp\php"
PHPRC
"\xampp\php"
TMP
"\xampp\tmp"
HTTP_HOST
"localhost"
HTTP_CONNECTION
"keep-alive"
CONTENT_LENGTH
"1271"
HTTP_CACHE_CONTROL
"max-age=0"
HTTP_ACCEPT
"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
HTTP_ORIGIN
"http://localhost"
HTTP_UPGRADE_INSECURE_REQUESTS
"1"
HTTP_USER_AGENT
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36 OPR/37.0.2178.43"
CONTENT_TYPE
"application/x-www-form-urlencoded"
HTTP_REFERER
"http://localhost/grav/id/admin==/pages/fuck/new-toe"
HTTP_ACCEPT_ENCODING
"gzip, deflate, lzma"
HTTP_ACCEPT_LANGUAGE
"id,en-US;q=0.8,en;q=0.6"
HTTP_COOKIE
"grav-site-f316ec0=maeqqvtekm6tk0c95efo3ntcl4; grav-site-f316ec0-admin=29c8p3vb2ci2ci0ckl6f476b43; __utma=111872281.525271770.1462389652.1462389652.1462389652.1; __utmz=111872281.1462389652.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); _ga=GA1.1.525271770.1462389652"
PATH
"C:\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\Program Files (x86)\Common Files\Intel\Shared Files\cpp\bin\Intel64;C:\Program Files (x86)\Steam;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\xampp\php;C:\adb;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\"
SystemRoot
"C:\Windows"
COMSPEC
"C:\Windows\system32\cmd.exe"
PATHEXT
".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
WINDIR
"C:\Windows"
SERVER_SIGNATURE
"<address>Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3 Server at localhost Port 80</address>\n"
SERVER_SOFTWARE
"Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3"
SERVER_NAME
"localhost"
SERVER_ADDR
"::1"
SERVER_PORT
"80"
REMOTE_ADDR
"::1"
DOCUMENT_ROOT
"D:/xampp/htdocs"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"D:/xampp/htdocs"
SERVER_ADMIN
"postmaster@localhost"
SCRIPT_FILENAME
"D:/xampp/htdocs/grav/index.php"
REMOTE_PORT
"12661"
REDIRECT_URL
"/grav/id/admin==/pages/fuck/new-toe"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.1"
REQUEST_METHOD
"POST"
QUERY_STRING
""
REQUEST_URI
"/grav/id/admin==/pages/fuck/new-toe"
SCRIPT_NAME
"/grav/index.php"
PHP_SELF
"/grav/index.php"
REQUEST_TIME_FLOAT
1463735504.574
REQUEST_TIME
1463735504
Environment Variables empty
Registered Handlers
0. Whoops\Handler\PrettyPageHandler
1. Whoops\Handler\CallbackHandler
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (12 by maintainers)
Fixed in other places too with
https://github.com/getgrav/grav-plugin-admin/commit/9affe0f94a8078d835f391ec47521d46a868f83b
and
https://github.com/getgrav/grav/commit/a381e5bb66196a302993f6d143c2a79fc6d86366
Thanks for the pointer, you’re right. Fixed in https://github.com/getgrav/grav/commit/02f863ad2c017dfa1232cc88d0d818db0c72577a
The issue is in the rendered form fields. If you go in that xxxx page and view the page source, unaffected by the JS, we do render 2
data[route]select, one for the actual form, and another for moving into modal. This is how they render respectively:I’m not sure why they are different since they should be using the same methods, but I am quite sure this is the issue.
Can you take it from here?
I tested and cannot reproduce the issue. Can you tell the exact steps you do to get the error, from the user folder you posted?
It’s mostly likely something up with a page. Can you provide a ZIP of your `user/ folder and let us know under which page, creating a new page causes a problem?