Dreamweaver Closes as it is Opening

Are you having a problem with Dreamweaver closing down (vanishing) as it starts to open new versions of WordPress?

Recent versions of WordPress have a new CSS file that is causing Dreamweaver no end of trouble. Attempting to load WordPress in Dreamweaver causes a partial load, then suddenly the load crashes and Dreamweaver vanishes from the screen. This is being caused by the recent change in WordPress to update the administration panel.

WordPress has added the CSS file /wp-includes/css/dashicons.min.css. This file is intended to add icons to the administration panel by using Font-face. Unfortunately this font face is enormous. The string incorporated in the font-face declaration is too large to be supported by Dreamweaver, causing Dreamweaver to crash.

Luckily, there is a solution to this problem. The solution is simple. If your version of Dreamweaver has the size limitation that causes crashes, simply delete the files /wp-includes/css/dashicons.min.css and /wp-includes/css/dashicons.css from your WordPress development environment. This will have little impact on your development.

Deleting the dashicons files from your development environment will have minor impact, but, probably none that bother your development. The deletion may cause the absence of font-face created icons in the administration area of your WordPress work environment, But, you will still see the alternate text associated with the icons. You can continue to work conveniently.

Warning: Remember as you load your work on your target website, you have deleted the dashicons files. Remember to include the dashicons files in your official release or your target site will have missing icons in the administration area.

Firefox suddenly loses vertical scroll bar

Warning: add-on extensions can cause Firefox to malfunction. This afternoon and evening I spent hours trying to figure out why some CSS3 commands were not working and the vertical scroll bar was vanishing from websites every time I shrank the Firefox window to the width of 530px. I assumed I was pushing the scroll bar off the screen by use of some combination of CSS directives.

After spending hours trying to decide what CSS3 combinations I might have used to case a problem, I went searching the internet and found multiple users had found similar behavior, but, there did not appear to be a common thread. Each person seemed to have the problem in different combinations or configuration that used Firefox.

Finally, I found a website where a person indicated that she was having the problem and a helpful person indicated she should disable her add-ons and see if the problem went away. She did not respond to the comment. Allow me to answer. In my case, this solved my problem. By process of elimination, I found the culporate to be the extension “PHP Developer ToolBar 3.0.5” by FelipeNMoura.

My comment is not intended to complain about the add-on, Felipe Moura did make an effort to provide a service, and I thank him for the effort. The comment is intended to let all know that it is possible for Firefox to malfunction as the result of add-ons, and you should disable plugins if you appear to have some subtle problems as you debug your website behaviors.

Drupal 7: Display Suites, Helpful for Custom Display of User Account Page

Perhaps you want to customize the User Account Page. You have multiple options. You can create custom user-profile.tpl.php file and link it into your site with complete control. Or you can have a bit less control and use the Display Suite Module and CSS.

If you need complete control of the content of the user Account Page, create of custom user-profile.tpl.php file, add it to your template directory and add code to your template.php to use the new user-profile.tpl.php file.

However, if your needs are simply to move things around in a minor way and hide or display some content from the Accounts Page, you may prefer to load Display Suite, select to adjust the user accounts page and make high level adjustments.

Once you use Display Suite, you may even find you really like using it to help doing adjustments and helping for format other pages.

Drupal 7: menu token and me Alias are not working

Currently, modules Menu Token and me Alias are not working (8/1/2014). There may be a way to get them to work … each has lots of notes around the internet that indicates they are working on & off, with lots of proposed workarounds. Trying workaround after workaround, I could not get them to work consistently or conveniently. Trying to use either, insert tokens in a menu is a problem. I have a solution. The solution is not sophisticated or convenient, but, it appears to work consistently. Hopefully, it will work consistently until the menu token or me Alias modules work consistently.

Unfortunately, the work around requires:

  • Some familiarity with php
  • Faking out the menu validation
  • use of hook_url_outbound_alter

To insert the current user_id tokens into the path in a menus:

  • Step 1: Realize you really want the path “user/uid/history”
  • Step 2: Create a basic content page with url of “user/uid/history”
  • Step 3: Select the menu you would like to add this entry too, add the menu label, path user/uid/history and save, the entry will be allowed because their is a valid page defined at user/uid/history.
  • Step 4: Before leaving the menu, check the actual node id that is automatically inserted in place of path you specified (ex. node/13 might be the real address)
  • Step 5: In the template.php, create the THEME_url_outbound_alter function as follows:
    
     
      function THEME_url_outbound_alter(&$path, &$options, $original_path) {
        if ($path == "node/13") {     // check $path == 
                                      //       the dummy address you created
          global $user;               // prepare to get the token uid value
                                      // build the $path with the current 
                                      // user uid 
          $path = 'user/' . $user->uid . "/history" ;
                                      // Set $options['alias'] = path you 
                                      // want accessed
          $options['alias'] = $path;  
        }
        // repeat the previous path redefine for all pages you would like
        // to include the token uid.   Other tokens may be dealt with in 
        // a similar manner. 
      
      }   
    
    

Drupal 7: Secret to using hook_menu_alter

Are you trying to use hook_menu_alter in Drupal 7 and finding that hook_menu_alter is not appearing to have any effect? There is a reason. Hook_menu_alter is not called every time you run your site. Hook_menu_alter only runs when the menu module is initialized or a menu is initially constructed. If you have an existing menu and you would like hook_menu_alter to affect that menu, you must do a menu rebuild. In theory, there are two trivial ways to do this. However, the 2 trivial methods may not work for you. The trivial methods are:

  • Use Devel module option to request menu rebuild
  • Use drush to request menu rebuild

However, these 2 methods may not be convenient for you. I know that right now (8/2/2014), Devel will not run correctly on my install because there appears to be problem with the current combination of devel, devel_theme & simplehtmldom that is currently available seem to crash my install. At the same time, drush is inconvenient for the install I have available. My solution involved creation of a simple file that will force the menu rebuild.

To do a menu rebuild programattically:

  • Create a file in your site’s base directory, perhaps menuRebuild.php
  • Include the following code in the new file
    
      <?php
      
        chdir("< your-root-directory >") ;
        define("DRUPAL_ROOT", getcwd());
        require_once("./includes/bootstrap.inc") ;
        drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL) ;
        // Rebuild
        menu_rebuild() ;
        echo "rebuilt" ;
    
      ?>
    
    
  • run the file … the menu will be built.