为什么Devel块显示性能,执行PHP和Switch用户块? -- 7 领域 和 debugging 领域 和 blocks 领域 drupal 相关 的问题

Why is the Devel block displaying the Performance, Execute PHP and Switch User blocks?


0
vote

问题

中文

我的devel block正在显示性能,交换机用户,也在侧边栏中执行PHP块,也使其非常难看和臃肿。

我看不出我本可以做些什么来引起它,并想知道它是否是由于与一些第三方模块的一些互动。

可能导致的是什么?

编辑:i hve将块的代码添加到低电平。在那里似乎有很多 admin-pane-xxxx 类和ID,我怀疑它与管理员菜单有关。我还在其他安装上检查了Devel,他们不显示此行为。我问了一个相关问题如何定位生成特定块的代码的位置。

  <div class="block block-admin contextual-links-region collapsiblock-processed admin-processed" id="block-admin-devel">      <h2 class="title collapsiblock"><a role="link" href="#">Devel</a></h2>   <div class="contextual-links-wrapper contextual-links-processed"><a href="#" class="contextual-links-trigger">Configure</a><ul class="contextual-links"><li class="block-configure first last"><a href="/admin/structure/block/manage/admin/devel/configure?destination=admin/structure/block">Configure block</a></li> </ul></div>   <div class="content">     <form accept-charset="UTF-8" id="admin-block-devel-form" method="post" action="/admin/structure/block"><div><div class="admin-panes clearfix  processed">            <div class="admin-pane admin-pane-active admin-pane-performance">         <h2 class="admin-pane-title"><a class="admin-pane-active active" href="/admin/structure/block#admin-pane-performance">Performance</a></h2>         <div class="admin-pane-content clearfix"><div class="item-list"><ul><li class="dev-timer first"><div class="dev-info"></div></li> <li class="dev-memory-usage last"><div class="dev-info"></div></li> </ul></div></div>       </div>                 <div class="admin-pane  admin-pane-switch_user">         <h2 class="admin-pane-title"><a class=" active" href="/admin/structure/block#admin-pane-switch_user">Switch user</a></h2>         <div class="admin-pane-content clearfix"><ul class="links clearfix"><li class="1 first"><a title="This user can switch back." href="/devel/switch/admin?destination=admin/structure/block&amp;token=D1XQMmu5YkZ3s5fmg1HjPNbpJEWdfz9BkeIjQPjFqDg"><strong><em class="placeholder">admin</em></strong></a></li> <li class="3"><a title="Caution: this user will be unable to switch back." href="/devel/switch/seetop?destination=admin/structure/block&amp;token=4zXMi8I2marB9l1FMwGzbC9845NRnmLqEFe_7pC4HGE">seetop</a></li> <li class="2 last"><a title="Caution: this user will be unable to switch back." href="/devel/switch/c3pio?destination=admin/structure/block&amp;token=FPTt2bcUUJr8YYRwD4mcoliAWNijuZ79sqZaFoz3Hgs">c3pio</a></li> </ul><div class="form-item form-type-textfield form-item-username" role="application">  <input type="text" class="form-text form-autocomplete" maxlength="60" size="16" value="" name="username" id="edit-username" autocomplete="OFF" aria-autocomplete="list"><input type="hidden" class="autocomplete autocomplete-processed" disabled="disabled" value="https://cc5.rca2.net/user/autocomplete" id="edit-username-autocomplete"> <div class="description">Enter username</div> <span aria-live="assertive" class="element-invisible" id="edit-username-autocomplete-aria-live"></span></div> <input type="submit" class="form-submit" value="Switch" name="op" id="edit-submit--3"></div>       </div>                 <div class="admin-pane  admin-pane-execute">         <h2 class="admin-pane-title"><a class=" active" href="/admin/structure/block#admin-pane-execute">Execute PHP</a></h2>         <div class="admin-pane-content clearfix"><div class="form-item form-type-textarea form-item-code">   <label for="edit-code">PHP code to execute </label>  <div class="form-textarea-wrapper resizable textarea-processed resizable-textarea"><textarea class="form-textarea" rows="20" cols="60" name="code" id="edit-code"></textarea><div class="grippie"></div></div> <div class="description">Enter some code. Do not use <code>&lt;?php ?&gt;</code> tags.</div> </div> <input type="submit" class="form-submit" value="Execute" name="op" id="edit-op"></div>       </div>                 <div class="admin-pane  admin-pane-menu">         <h2 class="admin-pane-title"><a class=" active" href="/admin/structure/block#admin-pane-menu">Other tools</a></h2>         <div class="admin-pane-content clearfix"><ul class="menu"><ul class="menu"><li class="first leaf"><a title="Helper functions, pages, and blocks to assist Drupal developers. The devel blocks can be managed via the block administration page." href="/devel/settings">Devel settings</a></li> <li class="leaf"><a title="Clear the CSS cache and all database cache tables which store page, node, theme and variable caches." href="/devel/cache/clear?destination=admin/structure/block">Empty cache</a></li> <li class="leaf"><a title="View entity information across the whole site." href="/devel/entity/info">Entity info</a></li> <li class="leaf"><a title="Execute some PHP code" href="/devel/php">Execute PHP Code</a></li> <li class="leaf"><a title="View fields information across the whole site." href="/devel/field/info">Field info</a></li> <li class="leaf"><a title="View a list of currently defined user functions with documentation links." href="/devel/reference">Function reference</a></li> <li class="leaf"><a title="View the active form/render elements for this site." href="/devel/elements">Hook_elements()</a></li> <li class="leaf"><a title="Details about a given menu item." href="/devel/menu/item?path=admin/structure/block">Menu item</a></li> <li class="leaf"><a title="View your server's PHP configuration" href="/devel/phpinfo">PHPinfo()</a></li> <li class="leaf"><a title="Rebuild menu based on hook_menu() and revert any custom changes. All menu items return to their default settings." href="/devel/menu/reset?destination=admin/structure/block">Rebuild menus</a></li> <li class="leaf"><a title="Run hook_uninstall() and then hook_install() for a given module." href="/devel/reinstall?destination=admin/structure/block">Reinstall modules</a></li> <li class="leaf"><a href="/devel/run-cron">Run cron</a></li> <li class="leaf"><a title="List the contents of $_SESSION." href="/devel/session">Session viewer</a></li> <li class="leaf"><a title="View a list of available theme functions across the whole site." href="/devel/theme/registry">Theme registry</a></li> <li class="last leaf"><a title="Edit and delete site variables." href="/devel/variable?destination=admin/structure/block">Variable editor</a></li> </ul></ul></div>       </div>     </div> <input type="hidden" value="form-9uJFBQ4hH879iRN_QBUrp46oNTDoops6Xvd5qoDSHkw" name="form_build_id"> <input type="hidden" value="hAmptoPteO_NNJXwFsRyruXJkKuh5LEmMFGxvtEqAkQ" name="form_token"> <input type="hidden" value="admin_block_devel_form" name="form_id"> </div></form>  </div> </div>   
英文原文

My Devel block is displaying the Performance, Switch Users and Execute PHP blocks as well in the sidebar, making it very unsightly and bloated as well.

I can't see what I could have done to cause that and wonder if it is due to some interaction with some third-party module.

What could have caused that?

EDIT: I hve added the code for the block to low. There seems to a lot of admin-pane-xxxx classes and IDs there, and I suspect it has something to do with Admin menu. I have also checked devel on other installations, and they don't display this behaviour. I have asked a related question regarding how to locate where code for a particular block is being generated.

<div class="block block-admin contextual-links-region collapsiblock-processed admin-processed" id="block-admin-devel">      <h2 class="title collapsiblock"><a role="link" href="#">Devel</a></h2>   <div class="contextual-links-wrapper contextual-links-processed"><a href="#" class="contextual-links-trigger">Configure</a><ul class="contextual-links"><li class="block-configure first last"><a href="/admin/structure/block/manage/admin/devel/configure?destination=admin/structure/block">Configure block</a></li> </ul></div>   <div class="content">     <form accept-charset="UTF-8" id="admin-block-devel-form" method="post" action="/admin/structure/block"><div><div class="admin-panes clearfix  processed">            <div class="admin-pane admin-pane-active admin-pane-performance">         <h2 class="admin-pane-title"><a class="admin-pane-active active" href="/admin/structure/block#admin-pane-performance">Performance</a></h2>         <div class="admin-pane-content clearfix"><div class="item-list"><ul><li class="dev-timer first"><div class="dev-info"></div></li> <li class="dev-memory-usage last"><div class="dev-info"></div></li> </ul></div></div>       </div>                 <div class="admin-pane  admin-pane-switch_user">         <h2 class="admin-pane-title"><a class=" active" href="/admin/structure/block#admin-pane-switch_user">Switch user</a></h2>         <div class="admin-pane-content clearfix"><ul class="links clearfix"><li class="1 first"><a title="This user can switch back." href="/devel/switch/admin?destination=admin/structure/block&amp;token=D1XQMmu5YkZ3s5fmg1HjPNbpJEWdfz9BkeIjQPjFqDg"><strong><em class="placeholder">admin</em></strong></a></li> <li class="3"><a title="Caution: this user will be unable to switch back." href="/devel/switch/seetop?destination=admin/structure/block&amp;token=4zXMi8I2marB9l1FMwGzbC9845NRnmLqEFe_7pC4HGE">seetop</a></li> <li class="2 last"><a title="Caution: this user will be unable to switch back." href="/devel/switch/c3pio?destination=admin/structure/block&amp;token=FPTt2bcUUJr8YYRwD4mcoliAWNijuZ79sqZaFoz3Hgs">c3pio</a></li> </ul><div class="form-item form-type-textfield form-item-username" role="application">  <input type="text" class="form-text form-autocomplete" maxlength="60" size="16" value="" name="username" id="edit-username" autocomplete="OFF" aria-autocomplete="list"><input type="hidden" class="autocomplete autocomplete-processed" disabled="disabled" value="https://cc5.rca2.net/user/autocomplete" id="edit-username-autocomplete"> <div class="description">Enter username</div> <span aria-live="assertive" class="element-invisible" id="edit-username-autocomplete-aria-live"></span></div> <input type="submit" class="form-submit" value="Switch" name="op" id="edit-submit--3"></div>       </div>                 <div class="admin-pane  admin-pane-execute">         <h2 class="admin-pane-title"><a class=" active" href="/admin/structure/block#admin-pane-execute">Execute PHP</a></h2>         <div class="admin-pane-content clearfix"><div class="form-item form-type-textarea form-item-code">   <label for="edit-code">PHP code to execute </label>  <div class="form-textarea-wrapper resizable textarea-processed resizable-textarea"><textarea class="form-textarea" rows="20" cols="60" name="code" id="edit-code"></textarea><div class="grippie"></div></div> <div class="description">Enter some code. Do not use <code>&lt;?php ?&gt;</code> tags.</div> </div> <input type="submit" class="form-submit" value="Execute" name="op" id="edit-op"></div>       </div>                 <div class="admin-pane  admin-pane-menu">         <h2 class="admin-pane-title"><a class=" active" href="/admin/structure/block#admin-pane-menu">Other tools</a></h2>         <div class="admin-pane-content clearfix"><ul class="menu"><ul class="menu"><li class="first leaf"><a title="Helper functions, pages, and blocks to assist Drupal developers. The devel blocks can be managed via the block administration page." href="/devel/settings">Devel settings</a></li> <li class="leaf"><a title="Clear the CSS cache and all database cache tables which store page, node, theme and variable caches." href="/devel/cache/clear?destination=admin/structure/block">Empty cache</a></li> <li class="leaf"><a title="View entity information across the whole site." href="/devel/entity/info">Entity info</a></li> <li class="leaf"><a title="Execute some PHP code" href="/devel/php">Execute PHP Code</a></li> <li class="leaf"><a title="View fields information across the whole site." href="/devel/field/info">Field info</a></li> <li class="leaf"><a title="View a list of currently defined user functions with documentation links." href="/devel/reference">Function reference</a></li> <li class="leaf"><a title="View the active form/render elements for this site." href="/devel/elements">Hook_elements()</a></li> <li class="leaf"><a title="Details about a given menu item." href="/devel/menu/item?path=admin/structure/block">Menu item</a></li> <li class="leaf"><a title="View your server's PHP configuration" href="/devel/phpinfo">PHPinfo()</a></li> <li class="leaf"><a title="Rebuild menu based on hook_menu() and revert any custom changes. All menu items return to their default settings." href="/devel/menu/reset?destination=admin/structure/block">Rebuild menus</a></li> <li class="leaf"><a title="Run hook_uninstall() and then hook_install() for a given module." href="/devel/reinstall?destination=admin/structure/block">Reinstall modules</a></li> <li class="leaf"><a href="/devel/run-cron">Run cron</a></li> <li class="leaf"><a title="List the contents of $_SESSION." href="/devel/session">Session viewer</a></li> <li class="leaf"><a title="View a list of available theme functions across the whole site." href="/devel/theme/registry">Theme registry</a></li> <li class="last leaf"><a title="Edit and delete site variables." href="/devel/variable?destination=admin/structure/block">Variable editor</a></li> </ul></ul></div>       </div>     </div> <input type="hidden" value="form-9uJFBQ4hH879iRN_QBUrp46oNTDoops6Xvd5qoDSHkw" name="form_build_id"> <input type="hidden" value="hAmptoPteO_NNJXwFsRyruXJkKuh5LEmMFGxvtEqAkQ" name="form_token"> <input type="hidden" value="admin_block_devel_form" name="form_id"> </div></form>  </div> </div> 
        
   
   

回答列表

0
 
vote

转到结构&gt;&gt;阻止并禁用侧边栏区域

 

Go to Structure >> Blocks and disable those blocks from your sidebar region

 
 
0
 
vote
vote
最佳答案
 

事实证明, admin 模块添加了另一个 enhanced 块将这些块组合成一个,该块被称为 Devel ,我正在激活它而不是使用devel模块自己的块

 

It turns out that the Admin module adds an additional enhanced block that combines those blocks into one, which is called Devel and I was activating it instead of using the Devel modules own blocks

 
 

相关问题

0  如何阻止匿名用户的内部Drupal路径?  ( How to block internal drupal paths for anonymous users ) 
是否可以阻止匿名用户的内部Drupal路径,并只留下由PathAuto生成的路径?例如: 块路径:/分类学/术语/ 5 留言:/产品/书籍 在Google网站管理员工具中为我的网站,所有分类页面都有一个名为"页面的问题,具有重复标题标记" ,谷歌正在向两个术语显示两个路径,这是一个问题。如何阻止匿名用户的内部D...

4  如何检索产品ID?  ( How can i retrieve the product id ) 
我正在尝试检索产品ID。我可以通过查找产品页面找到产品SKU,并使用<代码> commerce_product_load_by_sku() 加载它。 如何找到实际的身份证?我想在 commerce_cart_product_add_by_id() 中使用它。 ...

1  如何设置规则来重定向到购物车?  ( How to setup a rule to redirect to shopping cart ) 
我正在尝试创建一个规则,在用户创建一个帐户之后,它们被发送到结账页面,最终将通过paypal支付(我使用的商务模块)。 我到目前为止的步骤 1.创建一个事件"保存新用户帐户后" 2.留空空白。 3.选择订单完整结帐的操作 在第三步,它要求数据选择器:"选择类型商务单的数据。" 我不知道从这里去哪里。 ...

2  如何为jQuery DatePicker设置日期显示格式?  ( How to set date display format for jquery datepicker ) 
我在drupal 7中使用标准的jquery datepicker,我想改变它的保存和显示日期。我希望它能够清楚地显示2013年11月10日至11月10日。是否可以完成此操作? ...

1  查看3模板或UI问题  ( Views 3 template or ui question ) 
我有一个包含多个值的文本字段。该字段并不总是包含任何值。显示时,该字段需要有一个标签。 iow,行应该看起来像下面的一个行 Coauthor:人X,人物Y 或 Coauthor:人x 这是我的问题:当我使用视图UI添加标签时,我得到 Coauthor:Person X,Coauthor:人Y 当我使用模...

4  视图:未查询具有关系的自定义表  ( Views custom table with relationship is not queried ) 
我使用自定义表来存储我的节点上的数据,并挂钩 _views_data 以显示或排序从此表。 一切都很好: /** * Implements hook_views_data() */ function MYMODULE_views_data() { $data['MYTABLE']['table']['joi...

3  设置私有文件目录(nginx)  ( Setting up the private file directory nginx ) 
问题 我正在尝试在LEMP堆栈上为Drupal设置私人文件目录(Ubuntu 12.04,Nginx,MySQL,PHP),我不是100%确定权限或设置,所以我以为我'D问,你应该怎么做? 到目前为止 需要是网络服务器可写的文件夹,但无法从Web访问。 示例: 位置:drupal_root / private...

1  如何在以编程方式在Drupal Commerce中保存订单后立即启用付款方式?  ( How to enable a payment method as soon as an order is saved in drupal commerce p ) 
我正在尝试使用Drupal Commerce创建会员网站。我创建了一种自定义表单,可以收集用户的所有帐单详细信息和成员身份类型,然后在提交创建并保存Drupal Commerce Order(已创建的产品)。 现在我想在节省订单时激活订单的支付系统,但我没有能够这样做。所有这些都应该在后端发生,我不想将用户重定向到...

0  视图#3自定义处理程序错误  ( Views3 custom handler error ) 
我正在学习如何实现客户的观点3字段处理程序。 使用以下处理程序代码: class views_handler_filter_sub_nodes extends views_handler_field_custom{ function options_form(&$form, &$form_state){...

1  WebForm上传字段模板  ( Webform upload field template ) 
for drupal的file_managed窗口小部件我创建了自己的" theme_file_widget " 功能。 我需要为webform的文件窗口小部件做同样的事情,但我不知道要使用什么主题挂钩。任何想法? ...

0  如何从$ form_state ['值']恢复表单值?  ( How to restore form values from form statevalues ) 
我在数据库中保存 $form_sate['values'] 。当我的用户返回到我想要之前所提出的值的表格。类似: function my_form($form, &$form_sate) { $form_state_saved = get_form_state_values_from_db(); $fo...

2  在第一级显示父母,然后在每个页面中的孩子[关闭]  ( Show parents at first level then child in each page ) 
关闭。这个问题需要详细信息或清晰度。它目前不接受答案。 想要改进这个问题?添加详细信息并阐明编辑此帖的问题。 关闭 1年前。 ...

2  Drupal Commerce:全面设置订单  ( Drupal commerce set order as paid in full ) 
我正在尝试从CSV文件(来自另一个非Drupal数据库)导入记录,以便我移植到Drupal 7.我有Drupal Commerce,Commerce经常性框架设置。当你经历适当的工作流程时,一切都应该起作用。但是,我有2000多个需要添加到网站并通过该过程的记录并没有意义。换句话说,我正在编写一个脚本来设置订单,然后...

0  查询将大数字视为字符串  ( Query treating large number as a string ) 
我正在尝试在表上运行一个选择语句。 该列是十进制(20,0)无符号。 可以使用SELECT语句找到大部分条目: db_query('SELECT * FROM {foo_table} WHERE foo_id = :other_id',array(':other_id' => $value)) 和$ val...

1  Drupal 7 Commerce - 当您选择一个属性时,如何样式请等待加载消息/图标?  ( Drupal 7 commerce how do you style the please wait loading message icon when y ) 
我正在尝试在Drupal 7 Commerce中选择产品的属性时,请等待加载程序图标。我正在使用chrome,我无法弄清楚右键单击inspect元素的方式,因为它加载到快速。还是有另一种方式来暴露这一点?我只需要与它关联的HTML和类。 ...

1  设置订单已完成  ( Setting an order as completed ) 
在代码中,我尝试标记为已完成的订单。我在 hook_commerce_payment_order_paid_in_full 中这样做 function my_module_commerce_payment_order_paid_in_full($transaction) { $orderid = $tran...

2  我的菜单只会半翻译  ( My menu will only semi translate ) 
我在我的网站上创建了一个菜单,并使用了使用功能来导出它。前2个菜单项转换为不同的语言,但第三项不是。 第三个单词是联系人。我已经去了 99887664 并搜索联系人。我得到了以下内容。 在我的特征底部,它有 // Translatables // Included for use with stri...

5  jQuery.cookie.js仅用于jQuery更新模块的经过身份验证的用户  ( Jquery cookie js is loaded only for authenticated users by jquery update module ) 
jquery.cookie.js仅为经过身份验证的用户加载,我无法真正弄清楚为什么。 页面缓存已禁用。 任何想法? ...

0  订购用户使用中使用  ( Ordering users for use in view ) 
我有一个显示每个用户的数据的视图。现在我希望能够订购用户。 一个解决方案是将一个名为 99887661 的新字段添加一个新的字段到用户内容类型,然后使用此字段对视图进行排序,但最好是通过拖放来执行此操作来自 admin/people 配置页面。 我安装了权重模块,但似乎支持为用户设置权重。 是否有一个可以执行此操作的...

2  删除内容类型现在无法删除或编辑该类型的节点,但它在网站上可见  ( Deleted the content type now cannot delete or edit node of that type but it is ) 
我有一个我可以在我的网站上看到的节点,但是当我尝试编辑它时,我收到错误: Notice: Undefined index: my_node_name_node_form in drupal_retrieve_form() (line 763 of /home/sites/my-site-url/includes/...




© 2021 it.wenda123.org All Rights Reserved. 问答之家 版权所有


Licensed under cc by-sa 3.0 with attribution required.