Getting $_GET and $_REQUEST Empty

Permalink
Hello All,

I am getting $_GET and $_REQUEST Empty while editing blocks.

i checked in concrete/tools/edit_block_popup.php

can any one please let me know where value is resetting .

Url is ni consolehttp://www.example.com/index.php/tools/required/edit_block_popup.ph...

andrewjaff
 
Gondwana replied on at Permalink Reply
Gondwana
I don't think we're supposed to use $_REQUEST and $_GET directly in c5, perhaps because c5's routing, etc, can result in surprising $_REQUESTs. You may be able to obtain what you want from c5's 'request' and 'get' objects.
andrewjaff replied on at Permalink Reply
andrewjaff
$c = Page::getByID($_REQUEST['cID'], 'RECENT');
$a = Area::get($c, $_REQUEST['arHandle']);
if (!is_object($a)) {
   die('Invalid Area');
}


This is the code written that file , and i debug there is no data in request . Thats why getting error while editing block.
andrewjaff replied on at Permalink Reply
andrewjaff
Will anyone reply please ? this file is called when we add or edit block .
that is not custom code , c5 use ajax to add or edit blocks.

File calling seams fine but there is no data in GET or REQUEST .

Can anyone please let me know why ajax data is not coming on that file. even adding add , permission, anyting .
JohntheFish replied on at Permalink Reply
JohntheFish
See
https://documentation.concrete5.org/developers/appendix/deprecated-c...

For how to use the request object and how to access request parameters through it.
andrewjaff replied on at Permalink Reply
andrewjaff
Thanks for replying.

But I have not written code and it is stable version . Concrete 5.6..3.5