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
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?
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?
Ah when the root that have a custom slug, when I add pages through grave
admin, it won't saved and instead of save produces that error, when I put
the slug back to default same as the title, it works well.
Benyamin Limanto
sent from my Asus fonepad
On May 23, 2016 2:47 PM, "Flavio Copes" [email protected] wrote:
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?—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/getgrav/grav-plugin-admin/issues/606#issuecomment-220909621
I didn't get the error, but I got an issue when moving a page to being a subpage of a page with a custom slug.
The page is saved as a Grav root page instead of being a subpage. Will fix this, maybe it fixes your error too.
Okay, hope it will fixed soon, thanks anyway for looking.
On May 24, 2016 12:35 AM, "Flavio Copes" [email protected] wrote:
I didn't get the error, but I got an issue when moving a page to being a
subpage of a page with a custom slug.The page is saved as a Grav root page instead of being a subpage. Will fix
this, maybe it fixes your error too.—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/getgrav/grav-plugin-admin/issues/606#issuecomment-221040040
@w00fz I've been debugging this, I found all the code in move.js (https://github.com/getgrav/grav-plugin-admin/blob/develop/themes/grav/app/pages/page/move.js#L7-L12) is executed correctly, but if there's a custom slug for the page, for some reason
$('form#blueprints:first select[name="data[route]"]').data('selectize').getValue()
does not print me the value, even though it's correctly set in moveTo. So it's not sent as part of the data to the controller. It works fine for all other routes, I wonder if you have an idea why it's happening, as it's just a string.
I get the route when i run $('form#blueprints:first select[name="data[route]"]').val() even if the page and/or the parent have custom slugs.
Maybe pass me the user folder and steps you are doing to see this so I can try reproducing
@w00fz sure, get this pages structure here https://www.dropbox.com/s/xd8ocgj70bq1842/pages.zip?dl=0 and try moving page "Xxx" to being a child of one of the two other pages. I cannot move it inside the page with the slug set.
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:
<!-- actual data[route] in the form -->
<select name="data[route]" class="fancy">
<option value="/">- Root -</option>
<option value="/with-slug">With-different-slug</option> <!-- inconsistent -->
<option value="/without-slug">Without-slug</option>
</select>
<!-- data[route] in the move modal -->
<select name="data[route]" class="fancy">
<option value="/">- Root -</option>
<option value="/with-different-slug">With-different-slug</option> <!-- inconsistent -->
<option value="/without-slug">Without-slug</option>
</select>
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?
Thanks for the pointer, you're right. Fixed in https://github.com/getgrav/grav/commit/02f863ad2c017dfa1232cc88d0d818db0c72577a
Interesting, did that change with the new blueprints?
So will there any updates for it?
There will be in the next beta, in the meantime you can try applying the changes in the commits linked by Flavio above:
It's just a matter of changing those values in the yaml files.