WYSIWYG php error

Hi,


Just turned on html tidy and received a warning and php error when commiting:



Warning:

    MySource Warning
    File:  [SYSTEM_ROOT]/fudge/general/file_system.inc  Line:  113
    Message:  Unable to open temporary file () for writing, unable to write [SYSTEM_ROOT]/data/private/assets/bodycopy_div/0011/2423/content_file.php
    Backtrace:  Show (below)

Warning Backtrace

    0 => array (
    	"function" => "sq_error_handler",
    	"args" => array (
      0 => 512,
      1 => "Unable to open temporary file () for writing, unable to write [SYSTEM_ROOT]/data/private/assets/bodycopy_div/0011/2423/content_file.php",
      2 => "[SYSTEM_ROOT]/fudge/general/file_system.inc",
      3 => 113,
      4 => array (
     	 [Max Depth Reached]
      ) 
    	) 
    ),
    1 => array (
    	"file" => "[SYSTEM_ROOT]/fudge/general/file_system.inc",
    	"line" => 113,
    	"function" => "trigger_error",
    	"args" => array (
      0 => "Unable to open temporary file () for writing, unable to write [SYSTEM_ROOT]/data/private/assets/bodycopy_div/0011/2423/content_file.php",
      1 => 512 
    	) 
    ),
    2 => array (
    	"file" => "[SYSTEM_ROOT]/core/assets/bodycopy/bodycopy_container/bodycopy_container_edit_fns.inc",
    	"line" => 271,
    	"function" => "string_to_file",
    	"args" => array (
      0 => "\n
\n\n   \" alt=\"arial shot of river system\">As the global population becomes increasingly urbanised and human demand for water escalates, considerable pressure is being placed on freshwater resources and the ecosystems that they sustain. The sustainable management of water resources and the protection of riverine and coastal ecosystems requires an integrated and coordinated approach that draws upon a range of scientific disciplines, including the social sciences.

The Australian Rivers Institute (ARI) was established by Griffith University in 2006 to provide a focus for Australia\'s largest group of university-based scientists with expertise in river, catchment and coastal research and education and builds on the University\'s long-standing reputation in environmental science.

ARI builds on the strengths of two influential Griffith Research Centres, the Centre for Riverine Landscapes and the Centre for Aquatic Processes and Pollution. Its research portfolio centres around six strategic themes:

ARI, through its leaders and researchers, takes part in national and international water science planning and research bodies. Griffith University is a founding member of the International Water Centre and is represented on international water management committees, such as the Global Water System Project, and DIVERSITAS.

ARI is committed to promoting a \"whole-of-water-cycle\" water catchment and river-coastal linkage management philosophy and, through providing easier access to a co-ordinated skills base, enhance capacity building initiatives in Australia and across the Asia-Pacific region.

\n
\n",  1 => "[SYSTEM_ROOT]/data/private/assets/bodycopy_div/0011/2423/content_file.php" ) ), 3 => array ( "file" => "[SYSTEM_ROOT]/core/assets/bodycopy/bodycopy_containers/bodycopy_div/bodycopy_div_edit_fns.inc", "line" => 358, "function" => "generatecontentfile", "class" => "bodycopy_div_edit_fns", "type" => "->", "args" => array (  0 => new bodycopy_div Object (  [Max Depth Reached]  ) ) ), 4 => array ( "file" => "[SYSTEM_ROOT]/core/assets/bodycopy/bodycopy/bodycopy_edit_fns.inc", "line" => 371, "function" => "processcontainer", "class" => "bodycopy_div_edit_fns", "type" => "->", "args" => array (  0 => new bodycopy_div Object (  [Max Depth Reached]  ),  1 => new backend_outputter Object (  [Max Depth Reached]  ),  2 => "bodycopy_2422",  3 => "",  4 => "",  5 => array (  [Max Depth Reached]  ),  6 => array (  [Max Depth Reached]  ) ) ), 5 => array ( "file" => "[SYSTEM_ROOT]/core/include/asset_edit_interface.inc", "line" => 1891, "function" => "processbodycopy", "class" => "bodycopy_edit_fns", "type" => "->", "args" => array (  0 => new bodycopy Object (  [Max Depth Reached]  ),  1 => new backend_outputter Object (  [Max Depth Reached]  ),  2 => "bodycopy_2422" ) ), 6 => array ( "file" => "[SYSTEM_ROOT]/core/include/asset_edit_interface.inc", "line" => 1653, "function" => "processinline", "class" => "asset_edit_interface", "type" => "->", "args" => array (  0 => new bodycopy Object (  [Max Depth Reached]  ),  1 => new backend_outputter Object (  [Max Depth Reached]  ),  2 => ,  3 => "contents" ) ), 7 => array ( "file" => "[SYSTEM_ROOT]/core/include/asset.inc", "line" => 4136, "function" => "process", "class" => "asset_edit_interface", "type" => "->", "args" => array (  0 => new bodycopy Object (  [Max Depth Reached]  ),  1 => new backend_outputter Object (  [Max Depth Reached]  ),  2 =>   ) ), 8 => array ( "file" => "[SYSTEM_ROOT]/core/include/asset_manager_edit_fns.inc", "line" => 189, "function" => "processbackend", "class" => "bodycopy", "type" => "->", "args" => array (  0 => new backend_outputter Object (  [Max Depth Reached]  ),  1 => array (  [Max Depth Reached]  ) ) ), 9 => array ( "file" => "[SYSTEM_ROOT]/core/include/asset_manager.inc", "line" => 6924, "function" => "paintbackend", "class" => "asset_manager_edit_fns", "type" => "->", "args" => array (  [Empty] ) ), 10 => array ( "file" => "[SYSTEM_ROOT]/core/include/backend.inc", "line" => 1325, "function" => "paintbackend", "class" => "asset_manager", "type" => "->", "args" => array (  0 => new backend Object (  [Max Depth Reached]  ) ) ), 11 => array ( "file" => "[SYSTEM_ROOT]/core/include/backend.inc", "line" => 185, "function" => "_printmain", "class" => "backend", "type" => "->", "args" => array (  [Empty] ) ), 12 => array ( "file" => "[SYSTEM_ROOT]/core/include/mysource.inc", "line" => 351, "function" => "paint", "class" => "backend", "type" => "->", "args" => array (  [Empty] ) ), 13 => array ( "file" => "[SYSTEM_ROOT]/core/web/index.php", "line" => 31, "function" => "start", "class" => "mysource", "type" => "->", "args" => array (  [Empty] ) )


Error
    PHP Notice
    File:  [SYSTEM_ROOT]/core/assets/content_types/content_type_wysiwyg/content_type_wysiwyg_edit_fns.inc  Line:  311
    Message:  Undefined variable: status_msg
    Backtrace:  Show

Error Backtrace
    0 => array (
    	"function" => "sq_error_handler",
    	"args" => array (
      0 => 8,
      1 => "Undefined variable:  status_msg",
      2 => "[SYSTEM_ROOT]/core/assets/content_types/content_type_wysiwyg/content_type_wysiwyg_edit_fns.inc",
      3 => 311,
      4 => array (
     	 [Max Depth Reached]
      ) 
    	) 
    ),
    1 => array (
    	"file" => "[SYSTEM_ROOT]/core/assets/content_types/content_type_wysiwyg/content_type_wysiwyg_edit_fns.inc",
    	"line" => 311,
    	"function" => "paintbackendstatusicons",
    	"class" => "bodycopy_edit_fns",
    	"type" => "::" 
    ),
    2 => array (
    	"file" => "[SYSTEM_ROOT]/core/assets/bodycopy/bodycopy_containers/bodycopy_div/bodycopy_div_edit_fns.inc",
    	"line" => 296,
    	"function" => "paintbackendstatusicons",
    	"class" => "content_type_wysiwyg_edit_fns",
    	"type" => "->",
    	"args" => array (
      0 => new content_type_wysiwyg Object (
     	 [Max Depth Reached]
      ),
      1 => "bodycopy_2422_content_type_wysiwyg_2868" 
    	) 
    ),
    3 => array (
    	"file" => "[SYSTEM_ROOT]/core/assets/bodycopy/bodycopy/bodycopy_edit_fns.inc",
    	"line" => 260,
    	"function" => "paintcontainer",
    	"class" => "bodycopy_div_edit_fns",
    	"type" => "->",
    	"args" => array (
      0 => new bodycopy_div Object (
     	 [Max Depth Reached]
      ),
      1 => new backend_outputter Object (
     	 [Max Depth Reached]
      ),
      2 => "bodycopy_2422" 
    	) 
    ),
    4 => array (
    	"file" => "[SYSTEM_ROOT]/core/include/asset_edit_interface.inc",
    	"line" => 1047,
    	"function" => "paintbodycopy",
    	"class" => "bodycopy_edit_fns",
    	"type" => "->",
    	"args" => array (
      0 => new bodycopy Object (
     	 [Max Depth Reached]
      ),
      1 => new backend_outputter Object (
     	 [Max Depth Reached]
      ),
      2 => "bodycopy_2422" 
    	) 
    ),
    5 => array (
    	"file" => "[SYSTEM_ROOT]/core/include/asset_edit_interface.inc",
    	"line" => 731,
    	"function" => "printeditinterface",
    	"class" => "asset_edit_interface",
    	"type" => "->",
    	"args" => array (
      0 => "screen_contents",
      1 => new bodycopy Object (
     	 [Max Depth Reached]
      ),
      2 => new backend_outputter Object (
     	 [Max Depth Reached]
      ),
      3 => ,
      4 => array (
     	 [Max Depth Reached]
      ) 
    	) 
    ),
    6 => array (
    	"file" => "[SYSTEM_ROOT]/core/include/asset.inc",
    	"line" => 4094,
    	"function" => "paint",
    	"class" => "asset_edit_interface",
    	"type" => "->",
    	"args" => array (
      0 => new bodycopy Object (
     	 [Max Depth Reached]
      ),
      1 => new backend_outputter Object (
     	 [Max Depth Reached]
      ),
      2 =>  
    	) 
    ),
    7 => array (
    	"file" => "[SYSTEM_ROOT]/core/assets/bodycopy/bodycopy/bodycopy.inc",
    	"line" => 272,
    	"function" => "paintbackend",
    	"class" => "asset",
    	"type" => "::",
    	"args" => array (
      0 => new backend_outputter Object (
     	 [Max Depth Reached]
      ) 
    	) 
    ),
    8 => array (
    	"file" => "[SYSTEM_ROOT]/core/include/asset_manager_edit_fns.inc",
    	"line" => 215,
    	"function" => "paintbackend",
    	"class" => "bodycopy",
    	"type" => "->",
    	"args" => array (
      0 => new backend_outputter Object (
     	 [Max Depth Reached]
      ) 
    	) 
    ),
    9 => array (
    	"file" => "[SYSTEM_ROOT]/core/include/asset_manager.inc",
    	"line" => 6924,
    	"function" => "paintbackend",
    	"class" => "asset_manager_edit_fns",
    	"type" => "->",
    	"args" => array (
      [Empty]
    	) 
    ),
    10 => array (
    	"file" => "[SYSTEM_ROOT]/core/include/backend.inc",
    	"line" => 1325,
    	"function" => "paintbackend",
    	"class" => "asset_manager",
    	"type" => "->",
    	"args" => array (
      0 => new backend Object (
     	 [Max Depth Reached]
      ) 
    	) 
    ),
    11 => array (
    	"file" => "[SYSTEM_ROOT]/core/include/backend.inc",
    	"line" => 185,
    	"function" => "_printmain",
    	"class" => "backend",
    	"type" => "->",
    	"args" => array (
      [Empty]
    	) 
    ),
    12 => array (
    	"file" => "[SYSTEM_ROOT]/core/include/mysource.inc",
    	"line" => 351,
    	"function" => "paint",
    	"class" => "backend",
    	"type" => "->",
    	"args" => array (
      [Empty]
    	) 
    ),
    13 => array (
    	"file" => "[SYSTEM_ROOT]/core/web/index.php",
    	"line" => 31,
    	"function" => "start",
    	"class" => "mysource",
    	"type" => "->",
    	"args" => array (
      [Empty]
    	) 
    )


Sorry bout the length of post...

You need to check your filesystem permissions – make sure that the user that Apache is running as (apache or www-data, for example) has write permission to the entire data/ hierarchy.


I usually do the following from the SYSTEM_ROOT:


    # chown -R apache:apache *
    # find . -type d | xargs chmod 2775
    # find . -type f | xargs chmod 664
    # chmod +x scripts/backup.sh
    # chmod +x scripts/session-cleanup.sh

[quote]You need to check your filesystem permissions – make sure that the user that Apache is running as (apache or www-data, for example) has write permission to the entire data/ hierarchy.


I usually do the following from the SYSTEM_ROOT:


    # chown -R apache:apache *
    # find . -type d | xargs chmod 2775
    # find . -type f | xargs chmod 664
    # chmod +x scripts/backup.sh
    # chmod +x scripts/session-cleanup.sh

[right][post=“14801”]<{POST_SNAPBACK}>[/post][/right][/quote]



Warning gone :wink:

PHP notice still there for wysiwyg when html tidy is turned on… identical error.

[quote]Warning gone :wink:
PHP notice still there for wysiwyg when html tidy is turned on… identical error.

[right][post=“14802”]<{POST_SNAPBACK}>[/post][/right][/quote]





Hi Avi,



It is worth noting that HTMLTIDY seems to run fine when executed by the system_integrity_run_tidy.php script.



Thanks,

Anthony

The status message is new (it shows whether or not Tidy has run). Have you guys upgraded without running step_03.php perhaps?

[quote]The status message is new (it shows whether or not Tidy has run). Have you guys upgraded without running step_03.php perhaps?
[right][post=“14805”]<{POST_SNAPBACK}>[/post][/right][/quote]



No upgrade, we are experiencing this error/issue in a clean 3.12.0 installation (step03.php was run)…



A

The code indicates that HTMLTidy must have returned an unknown status. If you change some content and commit, does the status icon in the top right of the WYSIWYG bar show a red or green flag? or is it still grey?

[quote]The code indicates that HTMLTidy must have returned an unknown status. If you change some content and commit, does the status icon in the top right of the WYSIWYG bar show a red or green flag? or is it still grey?
[right][post=“14809”]<{POST_SNAPBACK}>[/post][/right][/quote]



Hi Greg,



When we turn on HTMLTIDY the status icon is red indicating that the content has not been tidied. When we try a commit the icon disapears and is not replaced. If you hover the mouse where the icon should be you get a “HTMLTIDY STATUS” message but no real status…



PHP returns the following error (no backtrace - see above messages for backtrace)


     PHP Notice
    Undefined variable: status_msg


??A :blink:

I suspect HTMLTidy is returning a status that we have not seen before. If possible, can you find out what version of HTMLTidy you are running and submit a bug report with that information as well as some content that you know to break it.

[quote]I suspect HTMLTidy is returning a status that we have not seen before. If possible, can you find out what version of HTMLTidy you are running and submit a bug report with that information as well as some content that you know to break it.
[right][post=“14822”]<{POST_SNAPBACK}>[/post][/right][/quote]



This has now been resolved. The plug-in for html tidy was disabled in the global preferences!



We had a problem with our global preferences which made them unavailable for a period of time. Unfortunately html tidy had been disabled in global preferences before the problem had arisen… all our doing I’m afraid!



Thanks Scott!

[quote]This has now been resolved.  The plug-in for html tidy was disabled in the global preferences! 


We had a problem with our global preferences which made them unavailable for a period of time.  Unfortunately html tidy had been disabled in global preferences before the problem had arisen… all our doing I’m afraid!



Thanks Scott!

[right][post=“14987”]<{POST_SNAPBACK}>[/post][/right][/quote]



No problems.

we are now getting the same wysiwyg error with the unknown status_msg. i've checked that html tidy is enabled in global preferences.


note, we only received the html tidy package today. are there any scripts that should be run to make it work?

[quote]we are now getting the same wysiwyg error with the unknown status_msg. i've checked that html tidy is enabled in global preferences.


note, we only received the html tidy package today. are there any scripts that should be run to make it work?[/quote]

Hi Chief,



Have you installed html tidy? After installation you then tell Matrix where it lives by filling in the "Path to HTML Tidy" on the External Tools Configuration screen of System Configuration.

[quote]Hi Chief,


Have you installed html tidy? After installation you then tell Matrix where it lives by filling in the "Path to HTML Tidy" on the External Tools Configuration screen of System Configuration.[/quote]



done that. well, i don't get a message saying the path to html tidy is incorrect.

Try checking tidy by running the "system_integrity_run_tidy.php script".



Next step would be to contact Squiz Support (support@squiz.net)… good luck :slight_smile: