Skip to content

Conversation

@Fedik
Copy link
Member

@Fedik Fedik commented Sep 22, 2018

Summary of Changes

The patch add possibility to view a Debug log, by use of DebugBar\OpenHandler.
It allows to debug POST (when #20677 will be merged to 4.0-dev) and non HTML request., and view of debug history.

Also I have changed default '.json' storage to '.php', wich is more secure.

Testing Instructions

Apply path, enable debug. Visit a couple pages on a site.
Open debug bar, you should be able to see a little folder icon.

screen 2018-09-22 21 27 13 450x94

Click on that folder and you will see Debug history per page.
screen 2018-09-22 21 28 46 691x275

Ping @elkuku
Reference to DebugBar pr #20380

@Fedik
Copy link
Member Author

Fedik commented Sep 22, 2018

Drone failure 'InstallCest: Configure joomla' seems not related to current PR

@elkuku
Copy link
Contributor

elkuku commented Sep 24, 2018

I have tested this item ✅ successfully on 0e51812

com_ajax - of course that's the Joomla! way (tm) - well done 👍


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22327.

public function find(array $filters = array(), $max = 20, $offset = 0)
{
// Loop through all .php files and remember the modified time and id.
$files = array();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can use short array syntax here?
Edit: also above and below...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it just a copy paste from original FileStorage, but okay

return;
}

if ('com_content' === $this->app->input->get('option') && 'debug' === $this->app->input->get('view'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just remove this whole if statement please. I don't think that we will add a view to com_content - ever..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, I thought it already something on the way 😄

@alikon
Copy link
Contributor

alikon commented Sep 24, 2018

wow
very good job

@alikon
Copy link
Contributor

alikon commented Sep 24, 2018

I have tested this item ✅ successfully on 0e51812


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22327.

$dataStr = file_get_contents($this->makeFilename($id));
$dataStr = str_replace('<?php die(); ?>#(^-^)#', '', $dataStr);

return json_decode($dataStr, true) ?: array();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to []

@laoneo laoneo added this to the Joomla 4.0 milestone Sep 25, 2018
@laoneo laoneo merged commit c892171 into joomla:4.0-dev Sep 25, 2018
@laoneo
Copy link
Member

laoneo commented Sep 25, 2018

Thanks

@Fedik Fedik deleted the debug-storage branch September 25, 2018 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants