Forums / Setup & design / how to stop coping for users ?!

how to stop coping for users ?!

Author Message

Selmah Maxim

Thursday 22 May 2003 2:24:26 am

Hi ..

Another role problem ...

i had gaved for registered users create and edit roles, work nice, but when user go to sitemap, he can can create in the main folder what he want, and he can copy objects to another place ... i had searched the roles for this, i had have gived the right roles (as i think) with create he can copy and create in main folder ... how to stop this ?

thx.

Selmah Maxim

Thursday 22 May 2003 2:38:11 am

maybe i found BUG !

now, i changed the users role, now they cann`t copy or create in the main folder, but if i write content/copy/NODE_ID , i get white page, and the debug report find errors :

Missing argument 2 for handleerror()
in c:\php\www\ez32\lib\ezutils\classes\ezmodule.php on line 228

Undefined variable: errorType in c:\php\www\ez32\lib\ezutils\classes\ezmodule.php on line 236

No template could be loaded for "error//3.tpl" using resource "design"

template 3.tpl is there under /design/my/templates/content/error/kernel .

is this bug, or i made somthing error here ?!?!

Selmah Maxim

Thursday 22 May 2003 3:01:30 am

Small Bug found !

kernel/content/copy.php line 44:
if ( $object === null )
return $Module->handleError( EZ_ERROR_KERNEL_NOT_AVAILABLE, "kernel" );

and to avoide this bug in another files, i had added $errorType default 'kernel'

lib\ezutils\classes\ezmodule.php line 228
function &handleError( $errorCode, $errorType="kernel", $parameters = array() )

Jan Borsodi

Thursday 22 May 2003 4:28:32 am

Thanks, I've added the fix in copy.php.

I've also fixed the handleError to handle errors more gracefully ;).
It will now allow the error type to not be supplied in which case it assumes 'kernel' and issues a warning.
function &handleError( $errorCode, $errorType = false, $parameters = array() )
{
if ( !$errorType )
{
eZDebug::writeWarning( "No error type specified for error code $errorCode, assuming kernel.\nA specific error type should be supplied, please check your code.",
'eZModule::handleError' );
$errorType = 'kernel';
}

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Selmah Maxim

Thursday 22 May 2003 5:15:32 am

no problem :)

eZ debug

Timing: Jan 18 2025 04:15:17
Script start
Timing: Jan 18 2025 04:15:17
Module start 'content'
Timing: Jan 18 2025 04:15:17
Module end 'content'
Timing: Jan 18 2025 04:15:18
Script end

Main resources:

Total runtime0.8843 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0085 587.7109180.8359
Module start 'content' 0.00850.7186 768.5469562.6016
Module end 'content' 0.72700.1572 1,331.1484337.4063
Script end 0.8842  1,668.5547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.4822210.0002
Check MTime0.00150.1718210.0001
Mysql Total
Database connection0.00200.231510.0020
Mysqli_queries0.801590.64432000.0040
Looping result0.00210.24111980.0000
Template Total0.851296.320.4256
Template load0.00250.277320.0012
Template processing0.848795.976220.4243
Template load and register function0.00020.027510.0002
states
state_id_array0.00080.091610.0008
state_identifier_array0.00100.113420.0005
Override
Cache load0.00210.2343390.0001
Sytem overhead
Fetch class attribute can translate value0.00220.248830.0007
Fetch class attribute name0.00140.155160.0002
XML
Image XML parsing0.00110.120930.0004
class_abstraction
Instantiating content class attribute0.00000.001660.0000
General
dbfile0.00280.3170280.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs