Wednesday 4 May 2016

Importing Bookmarks to Chrome from another Chrome installation

If you need to import your bookmarks to a new installation of Chrome, unless you log into your Chrome account, I found the task to be not so easy to find. You may need this when you switch to a new computer.

Version 50.0... on Windows 7 has 2 options when you try to import Bookmarks from the Menu Bookmarks > Import Bookmarks and configuration...:

  1. Microsoft Internet Explorer
  2. HTML Bookmarks file
The first option is quite useless, unless what you want to import are the Bookmarks and Settings from the Internet Explorer installed for the same user account as you logged in. I needed to import them from a disk from another computer, so this option is a no go.

The second option appears to be more general, but useless for my case: Chrome to Chrome.

So, the bookmarks file for Chrome on Windows 7 is installed in the file C:/Users/Your-Username/AppData/Local/Google/Chrome/User Data/Default/Bookmarks. You only need to

  1. Close Chrome.
  2. Replace your current Bookmarks file with the old one
  3. Start Chrome
The current Bookmarks are replaced with the old ones.

Saturday 23 April 2016

Debugging module installation on Drupal 7 with NetBeans

After following Configuring NetBeans, a very informative post on Drupal, I could still not debug my module on NetBeans 8.1. My main problem was that the breakpoints set on any of my module's files appeared as broken. In order to fix this, I needed to let NetBeans know which server request calls the module's code.

The Server request


Using Chrome's "Inspect" feature on the /admin/modules page after enabling my module and submitting the form, I found out that the module installation was being initiated by a POST request to "http://.../admin/modules/list/confirm".

I had created an apache virtual site to host it. On NetBeans, I included the whole Drupal 7 web tree as the project source (var/www/drupal7), and modified the project's Run Configuration accordingly (right click on the project's name > Properties):

NetBeans Project Properties - Run Configuration
Project Properties - Run Configuration
On the Advanced... settings window, I added the following Path Mapping:
  • Server Path: http://mylocalserver.local/admin/modules/list/confirm
  • Project Path: click on the ... and browse to the directory where your module is installed: /var/www/drupal7/sites/all/modules/my_module

Project Properties - Run - Advanced Web Configuration
Project Properties - Run Configuration - Advanced...


After this, the break points set on the files under .../my_module appeared and worked just fine.

Friday 25 March 2016

IIS Installation... no static content by default

I recently discovered that my initial installation of IIS 7.5 on Windows 7 professional didn't include basic features like serving static content... surprise!

So I reinstalled IIS following this guide on iis.net. On point number 7 of that page, it describes how to enable "Common Http Features" that are not enabled by default like: Directory browsing, or Static Content. This is the part I had missed before, I couldn't imagine that the default installation didn't include these basic features.