{"id":486,"date":"2013-02-05T23:25:58","date_gmt":"2013-02-06T06:25:58","guid":{"rendered":"http:\/\/pln.lanecc.net\/webteam\/?p=486"},"modified":"2013-02-05T23:25:58","modified_gmt":"2013-02-06T06:25:58","slug":"common-pitfall-links","status":"publish","type":"post","link":"https:\/\/blogs.lanecc.edu\/webteam\/2013\/02\/05\/common-pitfall-links\/","title":{"rendered":"Common Pitfall &#8211; Links"},"content":{"rendered":"<p>During our<a title=\"PeaceCenter\" href=\"http:\/\/pln.lanecc.net\/webteam\/2013\/01\/31\/peacecenter\/\"> last deployment<\/a>, we stumbled across a couple of errors our content editors made. When we talked to them about it, we learned that often, the editors weren&#8217;t even aware there was an issue. So I&#8217;d like to bring special attention to one of those errors that is easy to prevent, and helps make the website work better for everyone.<\/p>\n<h2>Links<\/h2>\n<p>There&#8217;s just a little bit of technical background you should be aware of. In Drupal, every page has a node number &#8211; an internal number that Drupal uses to identify your page, independent of the page title or URL. For example, our contact page, at <a href=\"http:\/\/www.lanecc.edu\/contact\">http:\/\/www.lanecc.edu\/contact<\/a>, is <a href=\"http:\/\/www.lanecc.edu\/node\/105\">node 105<\/a>, which you can see for yourself just by clicking those links.<\/p>\n<p>The URL for your page is based on two things: the &#8216;chunk&#8217; your page is assigned to, and the title you&#8217;ve given your page. For example, the page <a href=\"http:\/\/www.lanecc.edu\/math\/division-projects\">http:\/\/www.lanecc.edu\/math\/division-projects<\/a> is in the &#8220;Math&#8221; chunk, with the page title &#8220;Division Projects&#8221;. When that page title changes &#8211; say to just &#8220;projects&#8221;, then the URL of that page will also change. The new url will be www.lanecc.edu\/math\/projects.<\/p>\n<p>Why does this matter? Well, a number of our content editors are adding links to their pages by simply pasting a link on their page. Drupal, being a friendly, helpful CMS, automatically turns URLs into links. All is well and good until a page title changes and the URL changes. Suddenly, the pasted link isn&#8217;t to the right URL any more.<\/p>\n<p>The fix is to use the <a href=\"http:\/\/www.drupal.org\/projects\/linkit\">LinkIt<\/a> module. You might recognize it as the &#8220;Insert Link&#8221; button, from this image on our help documentation, and from the WYSIWYG editor:<\/p>\n<p><a href=\"http:\/\/www.lanecc.edu\/sites\/default\/files\/webhelp\/linkoptions.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"The Drupal editing interface\" src=\"http:\/\/www.lanecc.edu\/sites\/default\/files\/webhelp\/linkoptions.png\" width=\"791\" height=\"117\" \/><\/a>When you click that &#8220;Insert Link&#8221; button, you&#8217;re given a little popup window, where you can search for content and select the page you want to link to:<\/p>\n<p><a href=\"http:\/\/pln.lanecc.net\/webteam\/2013\/02\/05\/common-pitfall-links\/interface\/\" rel=\"attachment wp-att-487\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-487\" alt=\"The Drupal TinyMCE interface\" src=\"http:\/\/blogs.lanecc.edu\/webteam\/wp-content\/uploads\/sites\/25\/2013\/02\/interface.png\" width=\"870\" height=\"513\" srcset=\"https:\/\/blogs.lanecc.edu\/webteam\/wp-content\/uploads\/sites\/25\/2013\/02\/interface.png 870w, https:\/\/blogs.lanecc.edu\/webteam\/wp-content\/uploads\/sites\/25\/2013\/02\/interface-300x176.png 300w, https:\/\/blogs.lanecc.edu\/webteam\/wp-content\/uploads\/sites\/25\/2013\/02\/interface-624x367.png 624w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a>There&#8217;s two input boxes in that white box. If you&#8217;re linking to an internal page, start typing in the top box, and Drupal will search page titles for you, and let you select the page you&#8217;re looking for. If you&#8217;re linking to an external (not on Drupal) page, paste the URL in the bottom box, and then just say insert &#8211; there&#8217;s nothing to search for.<\/p>\n<p>Again, why does this matter? Because Drupal knows the node numbers of pages, and instead of linking to lanecc.edu\/contact, it will link to lanecc.edu\/node\/105. When someone visits the contact page, Drupal looks up what the URL is for node 105, and gives the visitor a link to the right place. In other words, you don&#8217;t need to worry about updating internal links &#8211; we&#8217;ll take care of it for you.<\/p>\n<p>Unfortunately, because not using LinkIt has resulted in a number of preventable 404 errors, we&#8217;re going to make some changes to the Drupal interface to make sure they don&#8217;t continue to cause problems. Soon, Drupal will no longer automatically link up URLs that you paste into the page &#8211; you&#8217;ll need to use LinkIt if you want them to work. And pasting a www.lanecc.edu link into the bottom box of LinkIt won&#8217;t work either &#8211; we&#8217;ve disabled that as well. *<\/p>\n<p>To help get the entire site back to where it should be, we&#8217;ll be checking the database over the next few weeks and helping editors that seem to be struggling. Don&#8217;t worry &#8211; we&#8217;re just trying to make sure that all the links on the site always work. And if you are having trouble, check our <a href=\"http:\/\/www.lanecc.edu\/webhelp\">help pages<\/a> (Drupal authentication required), and don&#8217;t hesitate to contact someone on the web team.<\/p>\n<p>* There&#8217;s also some room for User Interface improvement here, and we&#8217;re working on it, but it involves some tricky changes to some code that we didn&#8217;t write, and unfortunately user interface improvements often can&#8217;t be at the top of our priority list. But we won&#8217;t forget about this one.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>During our last deployment, we stumbled across a couple of errors our content editors made. When we talked to them about it, we learned that often, the editors weren&#8217;t even aware there was an issue. So I&#8217;d like to bring special attention to one of those errors that is easy to prevent, and helps make &hellip; <a href=\"https:\/\/blogs.lanecc.edu\/webteam\/2013\/02\/05\/common-pitfall-links\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Common Pitfall &#8211; Links&#8221;<\/span><\/a><\/p>\n","protected":false},"author":43,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":"","_wpscppro_dont_share_socialmedia":false,"_wpscppro_custom_social_share_image":0,"_facebook_share_type":"","_twitter_share_type":"","_linkedin_share_type":"","_pinterest_share_type":"","_linkedin_share_type_page":"","_instagram_share_type":"","_medium_share_type":"","_threads_share_type":"","_google_business_share_type":"","_selected_social_profile":[],"_wpsp_enable_custom_social_template":false,"_wpsp_social_scheduling":{"enabled":false,"datetime":null,"platforms":[],"status":"template_only","dateOption":"today","timeOption":"now","customDays":"","customHours":"","customDate":"","customTime":"","schedulingType":"absolute"},"_wpsp_active_default_template":true},"categories":[3],"tags":[25,14],"class_list":["post-486","post","type-post","status-publish","format-standard","hentry","category-drupal","tag-drupal","tag-pitfall"],"_links":{"self":[{"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/posts\/486","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/users\/43"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/comments?post=486"}],"version-history":[{"count":0,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/posts\/486\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/media?parent=486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/categories?post=486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/tags?post=486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}