101 Real Time Drupal Interview Questions and Answers
101 Real Time Drupal Interview Questions and Answers
CO
< >
www.titan.co.in
HOME(http://interviewquestionsanswerspdf.com/)drupalinterview
questions(http://interviewquestionsanswerspdf.com/category/drupalinterview
questions/)101REALTIMEDRUPALInterviewQuestionsand
Answers
101REALTIMEDRUPALINTERVIEWQUESTIONSAND
ANSWERS
Adsby Google
Belowarethelistoftop101Drupalinterviewquestions
DownloadPDF
andanswersforfreshersbeginnersandexperiencedpdf
InterviewQuestionsPDF
freedownload.
DrupalInterviewQuestionsandAnswers
:
1)WhatIsDrupal?
Drupal(pronouncedDruPull)isanopensourcecontentmanagementsystem
offeringatoolsetthatrivalsthoseofmostcommercialalternatives.With
integratedsocialmediaandecommercefunctionality,itprovidesuniquevalueas
partofyoursocialmediastrategy.
2)HowtocreateafolderandamodulefileinDrupal?
Giventhatourchoiceofshortnameisonthisdate,startthemodulebycreatinga
folderinyourDrupalinstallationatthepath:sites/all/modules/onthisdate.You
mayneedtocreatethesites/all/modulesdirectoryfirst.CreateaPHPfileand
saveitasonthisdate.moduleinthedirectorysites/all/modules/onthisdate.Asof
Drupal6.x,sites/all/modulesisthepreferredplacefornoncoremodules(and
sites/all/themesfornoncorethemes),sincethisplacesallsitespecificfilesinthe
sitesdirectory.Thisallowsyoutomoreeasilyupdatethecorefilesandmodules
withouterasingyourcustomizations.Alternatively,ifyouhaveamultisiteDrupal
installationandthismoduleisforonlyonespecificsite,youcanputitin
sites/yoursitefolder/modules.
Themoduleisnotoperationalyet:ithasntbeenactivated.Wellactivatethe
modulelaterinthetutorial.
3)Howtonameyourmodule?
Thefirststepincreatingamoduleistochooseashortnameforit.Thisshort
namewillbeusedinallfileandfunctionnamesinyourmodule,soitmuststart
withaletterandbyDrupalconventionitmustcontainonlylowercaselettersand
underscores.Forthisexample,wellchooseonthisdateastheshortname.
Importantnote:Itisnotjustaconventionthattheshortnameisusedforboththe
modulesfilenameandasafunctionprefix.WhenyouimplementDrupalhooks
(seelaterportionsoftutorial),Drupalwillonlyrecognizeyourhook
implementationfunctionsiftheyhavethesamefunctionnameprefixasthename
ofthemodulefile.
Itsalsoimportanttomakesureyourmoduledoesnothavethesameshortname
asanythemeyouwillbeusingonthesite.
DRUPALInterviewQuestionsandAnswers
4)ExplainthemenusysteminDrupal?
Definethenavigationmenus,androutepagerequeststocodebasedonURLs.
TheDrupalmenusystemdrivesboththenavigationsystemfromauser
perspectiveandthecallbacksystemthatDrupalusestorespondtoURLspassed
fromthebrowser.Forthisreason,agoodunderstandingofthemenusystemis
fundamentaltothecreationofcomplexmodules.Drupalsmenusystemfollowsa
simplehierarchydefinedbypaths.Implementationsofhook_menu()define
menuitemsandassignthemtopaths(whichshouldbeunique).Themenusystem
aggregatestheseitemsanddeterminesthemenuhierarchyfromthepaths.For
example,ifthepathsdefinedwerea,a/b,e,a/b/c/d,f/g,anda/b/h,themenu
systemwouldformthestructure:
a
a/b
a/b/c/d
a/b/h
e
f/g
5)HowtointeractwithDrupalsearchsystem?
Therearethreewaystointeractwiththesearchsystem:
Specificallyforsearchingnodes,youcanimplementnodeapi(updateindex)and
nodeapi(searchresult).However,notethatthesearchsystemalreadyindexesall
visibleoutputofanode,i.e.everythingdisplayednormallybyhook_view()and
hook_nodeapi(view).Thisisusuallysufficient.Youshouldonlyusethis
mechanismifyouwantadditional,nonvisibledatatobeindexed.
Implementhook_search().Thiswillcreateasearchtabforyourmoduleonthe
/searchpagewithasimplekeywordsearchform.Youmayoptionallyimplement
hook_search_item()tocustomizethedisplayofyourresults.
Implementhook_update_index().ThisallowsyourmoduletouseDrupals
HTMLindexingmechanismforsearchingfulltextefficiently.
Ifyourmoduleneedstoprovideamorecomplicatedsearchform,thenyouneed
toimplementityourselfwithouthook_search().Inthatcase,youshoulddefineit
asalocaltask(tab)underthe/searchpage(e.g./search/mymodule)sothatusers
caneasilyfindit.
6)HowtoCustomizeaDrupalSyndicateFeedIcon?
ForarecentprojectIneededtocustomizethefeediconintheDrupalthemeIwas
creating.ThiswasntasstraightforwardasIthoughtitwouldbe.Beingthedrupal
newbiethatIamIwentlookingforitinthecoretemplatesandsuggestionspage
onlytocomeemptyhanded.
PreviouslyIfoundthesolutiontothemingasearchformbyusingthesearch
blockform.tpl.phptemplatefileandthoughttherewouldbeoneforthefeedicon
too.Ifoundthesolutiontothisinthefunctionreferenceintheformofatheme
hook.
theme_feed_icon($url,$title)
Thisfunctionisinternallycalledbydrupaltogeneratethefeediconinthe
Syndicateblock.OurJobistooverridethisfunction.
7)HowtobackupaDrupalsite?
BackingupyourDrupalsiteisnowveryeasy,youjustneedtodownloadand
installamodulecalledBackup&Migrate.Toinstallthemoduleclickonthe
AdministerModuleschecktheBackupandMigratemoduleandenableitandsave
thesettings.
ThennavigatetotheAdministerContentManagementBackupandMigratethen
dothefollowingsettings.
Excludethefollowingtablesaltogether:selectthetablewhichyoudontwantto
takebackup.
Givethebackupfilename.
Therearealsooptionstocompressthefilebeforedownload,oradda
datestamp.
AndthenclickBackupDatabase.
AlternatelyyoucantakebackupsusingPhpMyAdmin.
8)HowtomoveaDrupalSitefromOnehost/servertoanotheron
yourNEWhost?
Uploadyourfolderwiththecompletedrupalinstallationtoyourhome
directory.
Oncedone,gotophpadminonthenewhost,createanewmysqldatabase,
examplename_drpl1andcreateanewmysqluser.Createapasswordforthis
newmysqluser,clickassignallprivilegestothisuserandassigntheusertothe
newdatabase.
Younowshouldhaveanewmysqldatabaseonthenewhostwithamysqluser,eg.
name_drpl1asdatabasenameandname_usernameasdatabaseusername.
Import(upload)thedatabase(whichyouexportedfromtheoldhostearlier)
withphpadmintothenewdatabase.Thismighttakeaminute.
Ifneedededitthefile[drupalhome]/sites/default/settings.phpandeditatthe
sectionwhereyouenterthedatabase,location,usernameandpassword.YouCAN
enterthepasswordeitherencryptedornotencryptedthere.
Chmodyourfilesfoldersoitiswriteableusingyourftpclient(filezilla),
chmodto777
Doublecheckyour.htaccessand[drupalhome]/sites/default/settings.phpand
makechangesincasetheyareneeded.
Changenameservesonyourdomainhostandletthempointtoyournewhosts
nameservers.
Enterthenewnameserversinyourcontrolpanelwhereyourdomainnamesare
hosted,overwritingtheoldones.
Aftersometime(sometimesadayortwo)yourdomainshouldpointtothenew
hostanddrupalshouldbeupandrunningonthenewhost.
9)HowtomoveaDrupalSitefromOnehost/servertoanother?
MigratingDrupalOnyourOLDhost:
Backupyourwholehomedirectoryfromyourftpaccessusinganftpclientlike
filezilla.Makeafolderonyourlocalharddiskanddownloadthecomplete
directorytothatlocalfolder.
Backupyourmysqldatabaseonyouroldhostusingphpadmin,selectyour
mysqldatabase,usuallysomethinglikename_drpl1.Selectallfields,click
exportandsavethedatabasetoyourlocalharddisk.Leavedefaultoptions
enabled.Youwillreceiveafilesimilartoname_drpl1.sql.
Thisisyourmysqldatabase
10)HowtoinstallDrupalonalocalWAMPserver?
PreparingyourcomputerwithalocalinstallationofDrupalwithWampServeris
comparativelyatroublefreeprocesstofollow.SinceWampServerwillinstallan
Apacheserver,SQL,PHPandphpMySQLonyourcomputer,withthosetoolsyou
caninstallandrunDrupallocallyevenwithoutaninternetconnection.
11)HowtoremovebreadcrumbsfrommyDrupalpages?
Breadcrumbsorbreadcrumbtrailisanavigationaidusedindrupalinterfaces.
Normallyitappearsinbetweenthetopbannerareaandthepagetitle.Itgives
usersawaytokeeptrackoftheirlocationwithinprograms.Breadcrumbsare
reallyusefulinacomparativelybiggerwebsitewithplentyofsectionsand
subsections.Butwhenitcomestosmallerwebsites,itmayfounduseless.Inthose
casesyoumayeitherhideitusingCSS(eg..breadcrumb{display:none})orin
thepage.tpl.phpfileremovethelinethatsays
12)HowtoaddcustomPHPcodesinmyDrupalpagesorblocks?
Bydefault,drupalwillnotallowinsertingPHPcodedirectlyinsideapostorina
block.Todothis,youneedtoactivateadrupalmodulecalledPHPfiltervia,
AdministerSitebuildingModules.Eventhoughthismoduleshipswithdrupal,it
remainsdisabledbydefault.
13)HowcanIcreateacustomregioninmyDrupaltemplate?
Addinganewregioninyourdrupaltemplateisnotahardthing,butitsnotas
easyasaddinganewblock.Itsbasicallyatwostepprocess:
definethecustomregioninyourthemes.infofile
insertsomePHPinyourthemespage.tpl.phpfilewhereveryouwouldlikethe
newregiontoappear
14)WhatdoesViewsdoandhowdoyouuseit?
ViewsisapracticalnecessityforsitesbuiltonDrupal6,anditsimperativethat
yourdeveloperunderstandshowtotakeadvantageofit.EarlMileshaswrittena
greatsummaryontheViewsprojectpage.
15)HowcanIaddanewBlockInDrupal?
Addinganewblockisasimpleprocessindrupal6.
GotoAdministerBlocksandclickontheAddBlocklink(tab).
FillintheformwiththenecessaryPHP/HTMLcodeintheblockbody.And
clicktheSaveBlockbutton.
16)HowcanIcustomizemy404Pagenotfoundpage?
Createanewpagewithsomeextrainformation,sothatyourvisitorsdontever
plungeontothedefaultboring404pagenotfounderrorpage.
Oncethispageiscreated:
RememberitsnodeID,
GotoAdminister>Siteconfiguration>Errorreporting
SetDefault404(notfound)pagetothenodeIDyoujustcreated
Saveyoursettings
YoucanalsousetheSearch404moduleasanalternative.
17)HowtohandleupgradesinDrupal?
ItsafactoflifethatyoullhavetoupgradeyourDrupalinstallationand
contributedmodulesfairlyfrequently.Yourcandidateshouldmention:
backingupthesite,
puttingitintomaintenancemode
downloadingthenewversionofthemodule
uncompressingit
runningupdate.php
testingthesite
takingthesiteoutofmaintenancemode
Ideally,yourcandidatewouldalsomentioncreatingadevelopmentenvironment
tominimizedowntime.Thereisalsoabigdifferencebetweenupgradingamodule
(processdescribedabove)andaDrupalminorversionupgrade,whichrequires
morecarefulpatching.Drupalmajorversionupgrades,whichhappenevery
coupleyears,areanothercanofwormsentirely.
18)HowdoIshowdifferentDrupalthemesondifferentpages?
Yeahitspossible!Youcanapplydifferentthemestodifferentpagesinyour
drupalsitesimplywiththehelpofacoolmodulecalledSections.
19)HowdoIaddimagestoDrupal?
Imagemoduleallowsuserswithproperpermissionstouploadimagesinto
Drupal.Thumbnailsandadditionalsizesarecreatedautomatically.
Imagescouldbepostedindividuallytothefrontpage,includedinstoriesor
groupedingalleries.
20)HowcanItranslateDrupaltomylocallanguage?
Theinterfacetext(liketheLoginbuttonandtheAddnewcommenttext)isin
Englishbydefault,butcanbetranslated.Formanylanguages,thereare
completedorpartlycompletedtranslationsavailable.(Seethelocalemoduleon
howtousethem.)
Alllanguagesneedmoretranslationcontributions.Somehaveonlyincomplete
versionsofthetextincore,sothatpartsoftheinterfacewillshowupinEnglish.
Othersmaybecompletebutneedcorrectionsandimprovementsofthelanguage.
Andnolanguagehasacompletesetoftranslationsforallcontributedmodules.
21)HowdoIremovethetitleNavigationfromthenavigationblock?
Topreventthenavigationblocktitleoranyotherblocktitlefromappearinginthe
pages,justdothefollowing.
NavigatetoAdministerSitebuildingBlocksandclicktheconfigurelinknextto
theNavigationblock.
Intheblockconfigurationpage,enterintheBlocktitlefiled.Thiswilloverride
thedefaulttitlefortheblockandremovethetitle.
22)HowdoIgetmysitetohaveSEOfriendlyURLs?
ThePathautomoduleautomaticallygeneratesURL/pathaliasesforvariouskinds
ofcontent(nodes,taxonomyterms,users)withoutrequiringtheusertomanually
specifythepathalias.ThisallowsyoutohaveURLaliaseslike/category/my
nodetitleinsteadof/node/123.Thealiasesarebaseduponapatternsystem
thatusestokenswhichtheadministratorcanchange.
23)HowcanIenablecleanURLsinDrupal?
DrupalsdefaultURLstructureislikehttp://www.sitename.com/?q=node/10
ThisURLformatcanbehardtoread,andcansometimespreventsearchengines
fromindexingallyourpagesproperly.Inthiscaseyoucaneliminatethis?q=
andcleantheURLsthroughthefollowingsteps.
NavigatetoAdministerSiteconfigurationCleanURLs.Bydefault,itwillbe
disabled.Selectenabledandclickthesaveconfigurationbutton.Youaredone.
YoucanmakeyourURLsevenmorecleanerwiththehelpofpathmodule.
HomeAdministerSitebuildingModules:enablethePathModule.
24)HowcanIchangethefaviconinmyDrupalSite?
Createyourownfavicon.icofileusinganygraphictoolsorwiththehelpofany
onlinefavicongeneratortoolslikednamicdrive.
Navigatetoadminsitebuildingthemesandclicktheconfigurelinknexttoyour
currenttheme.Thiswillbringupthethemeconfigurationpage.
HereyouwillseeasectiontitledShortcuticonssettings.Youcaneitherupload
yourfaviconfileorspecifythepathtoyourcustomizediconfile.
Thechangesmaynotappearimmediatelyinyourbrowser,youneedtoclearyour
browserscacheandreloadthepage.Ifyouhavebookmarkedyoursite,youmay
needtodeletethebookmarkandthenrecreateitagainsothatthenewfaviconwill
appearinthebookmarksmenu.
25)ExplainfaviconinDrupal?
Afavicon(shortforfavoritesicon),alsoknownasawebsiteiconorbookmark
iconisa1616pixelsquareiconthatappearsneartheaddressbarandinthe
bookmarksfolderinavisitorsbrowser.Bydefault,adrupalsiteshowsthatwater
dropkindadrupallogoasfavicon.
26)HowcanIresetmyDrupaladminpassword?
LogintocPanel>Databasesbox>phpMyAdmin
SelecttheDruapldatabasefolderfromtheleftnavigationbar.Thepagewill
refreshandandtheDrupaldatabasestableswillbedisplayedonit.
ClickontheSQLtab.
InthetextfieldwritethefollowingSQLquery:
updateuserssetpass=md5(NEWPASS)whereuid=1whereNEWPASSis
yournewDrupaladministrativepassword.
ClicktheGObuttontosubmitthequery.Ifthequeryisexecutedcorrectlyandno
errorsaredisplayedthenyoushouldbeabletologinwiththenewpassword.
27)HowtoinstallanewmoduleinDrupal?
Afterfindinganddownloadingamodule,thenextstepwouldbetocopyitthe
modulesfolder.Mostpeoplecopythefiletothedefaultmodulesfolderhere
http://sitename.com/drupal/modulesthisiswhereallthemodulesthatshipwith
Drupalarestoredsoitseemssomewhatlogicaltodothis.Butthisfolderis
actuallymeanttostoreonlyDrupalsdefaultmodules.Insteadyoushouldgoto
http://sitename.com/drupal/sites/allfolder,thereyouwillseeareadme.txtfile.
Thisfilewillclearlytellyouthetrick.Youjustneedtocreateanewfoldernamed
moduleshere.Nowcopythemodulesfolderhere.Thatsall,youhavesuccessfully
installedthemodule.
NextstepwouldbetoenablethemodulethroughtheAdmininterface.Todothis
navigatetoAdministerSiteBuildingModules.Hereyouwillseealistoffall
installedmodules,andournewlyinstalledmodulewillalsobelistedhere.You
justhavetochecktheenablecheckboxagainstthenewmoduleandthenclickthe
SaveConfigurationbutton.Thatsall.
28)HowcanIinstallanewthemeinDrupal?
ThisisanothercommonquestionamongDrupalnewbiesalltime.Aftertryingout
allavailablethemesunderDrupalsthemedirectory,wemaynaturallywanttotry
newthemes.Installinganewthemeisverysimpleandstraightforward.Follow
thestepsbelow.
Downloadanewthemepackage.NotethatthemesfordifferentDrupalversions
arenotcompatible,version5.xthemesdonotworkwithDrupal6.xandreverse.
ReadanyREADMEorINSTALLfilesinthepackagetofindoutifthereareany
specialstepsneededforthistheme.
Uploadthecontentsofthethemepackagetoanewdirectoryinthethemes
directoryinyourDrupalsite.InDrupal5.x&6.x,youplaceyourthemesin
/sites/all/themes/yourThemeName
Clickadministerthemesandenablethenewtheme(Drupalwillautodetectits
presence).
Edityouruserpreferencesandselectthenewtheme.Ifyouwantittobethe
defaultthemeforallusers,checkthedefaultboxinthethemesadministration
page.
29)HowtomakemyDrupalsiteofflinetopublic,whileitisunder
construction?
YoucansetyourDrupalsiteinofflinemode,whileitisbeingdeveloped.Just
clickAdministerSitemaintenance.Thereyoucansetthestatustooffline.Ifyou
wants,youcanalsosetyourowncustomofflinemessage.WhensettoOffline,
onlyuserswiththeadministersiteconfigurationpermissionwillbeabletoaccess
yoursitetoperformmaintenanceallothervisitorswillseethesiteoffline
messageconfiguredthere.AuthorizeduserscanloginduringOfflinemode
directlyviatheuserloginpage.
30)HowdoescachingworkinDrupal?
Oneofthecommon(mostlyunfounded)complaintsaboutDrupalhasbeen,
Drupalisslow.YouwanttohireadeveloperwhounderstandsDrupalsbuiltin
cachingsystem,andwhatitslimitationsare.Forexample,Drupal6sblockcache
willnotappreciablyspeedupthepageiftheuserisloggedin.
AskyourcandidatetorecommendsomeadditionalsolutionstospeedupDrupals
caching.ThesecouldincludetheBoostmodule,Varnish,Squid,Memcacheor
Pressflow.AskiftheyveeverrunintoissueswithDrupalscache.
31)CanyoupleaseexplainthedifferencebetweenCoreandContribin
Drupal?
ThestandardreleaseofDrupal,knownasDrupalcore,containsbasicfeatures
commontocontentmanagementsystems.Theseincludeuseraccountregistration
andmaintenance,menumanagement,RSSfeeds,pagelayoutcustomization,and
systemadministration.TheDrupalcoreinstallationcanbeusedasa
brochurewarewebsite,asingleormultiuserblog,anInternetforum,ora
communitywebsiteprovidingforusergeneratedcontent.
AsofAugust2011therearemorethan11,000freecommunitycontributed
addons,knownascontribmodules,availabletoalterandextendDrupalscore
capabilitiesandaddnewfeaturesorcustomizeDrupalsbehaviorandappearance.
Becauseofthispluginextensibilityandmodulardesign,Drupalissometimes
describedasacontentmanagementframework.Drupalisalsodescribedasaweb
applicationframework,asitmeetsthegenerallyacceptedfeaturerequirements
forsuchframeworks.
32)WhatareSystemrequirementsforDrupal?
Aminimumbaseinstallationrequiresatleast3MBofdiskspacebutyoushould
assumethatyouractualdiskspacewillbesomewhathigher.Forexample,ifyou
installmanycontributedmodulesandcontributedthemes,theactualdiskspace
foryourinstallationcouldeasilybe40MBormore(exclusiveofdatabasecontent,
media,backupsandotherfiles).
33)WhycanotADrupalusereditanodetheycreated?
Symptoms:AnauthorizedDrupaluserloseseditaccesstonodestheyvecreated,
eveniftheyhaveappropriatenode(orothermodule)accesspermissions.Or,user
cannoteditanodethatshouldbeeditablebythem,basedonaccesscontrolor
nodeaccesssettings.Noerrorsorwarningsarepresentedtotheuser.Nothingin
theDrupalwatchdoglog.
PossibleCause:Theuserdoesnothavepermissiontousetheinputfiltercurrently
assignedtothenode.(Anadministratororotherprivilegedusermayhave
changedtheinputfiltersettings,or,inputfilterpermissionsmayhavebeen
changedtoexcludethenodeauthorsincethenodewascreated.Asaresult,the
userneverhad,ornolongerhaspermissiontousetheinputfilterassociatedwith
thenode.)
34)HowDoesDrupalComparetoRubyonRails?
AnothercommonalternativeplatformtoDrupalisRubyonRails.Wereallydont
havemuchtosayaboutRubyexceptthatitisaframeworkmoresothana
platform.Therearesomecharacteristicallychallengingwebdevelopmenttasks
thatarequiteeasytodowithRuby,andthereareotherswhichareinfinitelymore
complicatedthantheyshouldbe.
OnebigdifferenceisthefactthatRubylackstherefineddataobjectmodelfound
inDrupalthatensuresinteroperabilitybetweenvariousaspectsofthesystem,
suchasaddingnewmodulestomodifytheoperationsofothers.WhereasDrupal
offersaselfgeneratingdatabaseschemaformanymodulesandunderlying
componentsoftheplatform,RubyonRailsemphasizesadesignphilosophy
holdingthatsimplificationofcodeconventionsleadstobetteroutcomes.While
thisallsoundsgoodinprinciple,wehavefoundtherearecertaintasksthatmake
adherancetothisphilosophyanidealmoresothanapracticalgoalandbreaking
freefromtheseconventionswhennecessaryadauntingtask(especiallywhen
integratingwithexternalsystems).
35)HowDoesDrupalComparetoOtherOpenSourceCMSSystems?
Drupalisalsooftencomparedwithotheropensourcecontentmanagement
systemsincludingJoomla,Plone,Scoop,Silverstripe,Typo3,Graffitti,Moveable
TypeandWordPress.Therearecharacteristicfeaturestoallofthesesystemsthat
makethemappropriateincertaincontexts,andmostofthemcomparefavorably
toDrupalinonecategoryofoperationoranother.Fewofthem,however,are
capableofofferingthebalancebetweenperformanceandfunctionalityfoundin
Drupal.
36)HowDoesDrupalComparetoCommercialCMSSystems?
Drupalisoftencomparedtoanumberofcommercialcontentmanagement
systemsincludingCrownPeak,ExpressionEngine,ClickabilityandSiteLifein
termsofcapabilities.Noneofthesesystemsoffertherangeoffeaturesthatcanbe
foundinDrupalortheflexible,developerfriendlyarchitecturethatallowsusto
rapidlydeploydynamicwebsites.Intermsofsustainability,theseplatforms
charactertisticallylacktheinnovativeapproachtodevelopmentembracedbythe
Drupalcommunity,withupdatesandnewfeaturescontinuallybeingaddedtothe
platform.ThesesystemstypicallydosurpassDrupalintermsofoutofthebox
reportingandmetricstools,generallyprovidingviewsofdatathatisalsostoredin
othersystems.Forinstance,detailedpagetrackinginformationcanjustaseasily
bepulledfromaCDNandintegratedintoaDrupalsiteformuchlessthanthe
costsofperseatlicensesfromacommercialvendorovera1monthperiod.
37)WhatKindofSupportIsAvailable?
AwiderangeofsupportservicesareavailablefororganizationsrunningDrupal
sites.TheDrupalcommunityitselfisanexcellentresourceforpeoplelookingto
learnmoreabouttheplatformorresolvespecificissuesthatemergeusingthe
system.AcquiaoffersanenterprisedistributionofDrupalthatincludesuptime
monitoring,emailandtelephonebasedtroubleshootingsupport,andsubscription
plansforsiteswithvaryingperformancerequirements.
Forhosting,Ourworkswithavarietyofpartnerstodeliversolutionstoensure
sitesareoperationalandcanscaletomeetchangingtrafficexpectations.
RackspaceisOurpreferredhostingpartner,andtheir100%uptimeguarantee
allowsustofocusonbuildinggreatwebsiteswithoutworryingaboutthenetwork.
WorkhabitandAmazonS3offercloudhostingsolutionsthatallowustobuild
sitesthatautomaticallyscaletohandlelargepeaksoftraffic,andtoprovisionnew
serversdynamicallybasedonactualtrafficconditionsonanygivenday.
38)HowDoesDrupalScale?
TrellonhasbuiltDrupalsitesanddeployedtheminverydemandingscenarios,
servingmillionsofpageviewsaday.Drupalscalabilityandperformance
optimizationisoneofourcorecompetencies,andweoftenworkwithexistingweb
propertiestofindwaystoimprovetheirperformance.Contactustodiscussyour
specificneeds.
39)WhatDoesDrupalDo?
Drupalisthechoiceformanygreatwebsitesbecauseitdoesalotofdifferent
thingsverywell,andallowsdifferentkindsofinformationtointeracteffectively
throughitsflexible,openarchitecture.Comparedwithcommercialorcustom
solutions,Drupalsfeaturesetisfarmoreeconomicandpracticalformost
organizations.
40)ExplaincodingstandardsinDrupal?
AspertheCodingstandards,omittheclosing?>tag.Includingtheclosingtag
maycausestrangeruntimeissuesoncertainserversetups.(Notethatthe
examplesinthehandbookwillshowtheclosingtagforformattingreasonsonly
andyoushouldnotincludeitinyourrealcode.)
AllfunctionsinyourmodulethatwillbeusedbyDrupalarenamed
{modulename}_{hook},wherehookisapredefinedfunctionnamesuffix.
Drupalwillcallthesefunctionstogetspecificdata,sohavingthesewelldefined
namesmeansDrupalknowswheretolook.Wewillcometohooksinawhile.
41.WhatisCMS?
Acontentmanagementsystem(CMS)isacollectionofproceduresusedto
manageworkflowinacollaborativeenvironment.Theseprocedurescanbe
manualorcomputerbased.Theproceduresaredesignedto:
*Allowforalargenumberofpeopletocontributetoandsharestoreddata
*Controlaccesstodata,basedonuserroles.Userrolesdefinewhatinformation
eachusercanvieworedit
*Aidineasystorageandretrievalofdata
*Reducerepetitiveduplicateinput
*Improvetheeaseofreportwriting
*Improvecommunicationbetweenusers
InaCMS,datacanbedefinedasalmostanythingdocuments,movies,pictures,
phonenumbers,scientificdata,etc.CMSsarefrequentlyusedforstoring,
controlling,revising,semanticallyenriching,andpublishingdocumentation.
Contentthatiscontrolledisindustryspecific.Forexample,entertainment
contentdiffersfromthedesigndocumentsforafighterjet.Therearevarious
termsforsystems(relatedprocesses)thatdothis.Examplesarewebcontent
management,digitalassetmanagement,digitalrecordsmanagementand
electroniccontentmanagement.Synchronizationofintermediatesteps,and
collationintoafinalproductarecommongoalsofeach.
cms,drupal,drupalcms,interviewquestions,technical,joomla,joomlacms,drupal
interviewquestion,contentmanagementsystem
42.SourceCode
Theprogrammustincludesourcecode,andmustallowdistributioninsource
codeaswellascompiledform.Wheresomeformofaproductisnotdistributed
withsourcecode,theremustbeawellpublicizedmeansofobtainingthesource
codefornomorethanareasonablereproductioncostpreferably,downloadingvia
theInternetwithoutcharge.Thesourcecodemustbethepreferredforminwhich
aprogrammerwouldmodifytheprogram.Deliberatelyobfuscatedsourcecodeis
notallowed.Intermediateformssuchastheoutputofapreprocessorortranslator
arenotallowed.
43.DerivedWorks
Thelicensemustallowmodificationsandderivedworks,andmustallowthemto
bedistributedunderthesametermsasthelicenseoftheoriginalsoftware.
44.IntegrityofTheAuthorsSourceCode
Thelicensemayrestrictsourcecodefrombeingdistributedinmodifiedformonly
ifthelicenseallowsthedistributionofpatchfileswiththesourcecodeforthe
purposeofmodifyingtheprogramatbuildtime.Thelicensemustexplicitly
permitdistributionofsoftwarebuiltfrommodifiedsourcecode.Thelicensemay
requirederivedworkstocarryadifferentnameorversionnumberfromthe
originalsoftware.
45.NoDiscriminationAgainstPersonsorGroups
Thelicensemustnotdiscriminateagainstanypersonorgroupofpersons.
46.WhatareGNULicenses?
DoesfreesoftwaremeanusingtheGPL?
Notatalltherearemanyotherfreesoftwarelicenses.Wehaveanincomplete
list.Anylicensethatprovidestheusercertainspecificfreedomsisafreesoftware
license.
47.WhyaresomanyDrupalversionsavailable4.x,5.x?Which
oneshouldIuse?
Itisrecommendedthatyourunthemostcurrentstablerelease.Thiscanalways
befoundattheDrupalProjectpage.However,iftherearenocompellingfeatures
inthelatestversion,acontribmodulethatisimportanttoyouisntreadyoryou
donthavetime,thereisnoneedtorushyourupgradeaslongassecurityupdates
areavailablefortheversionyouarerunning.
48.CanIuseDrupalonthecommandline?
Yes,youcanusedrush
drushisacommandlineshellandUnixscriptinginterfaceforDrupal
49.WhatarehooksinDrupal?
AllowmodulestointeractwiththeDrupalcore.
Drupalsmodulesystemisbasedontheconceptofhooks.AhookisaPHP
functionthatisnamedfoo_bar(),wherefooisthenameofthemodule(whose
filenameisthusfoo.module)andbaristhenameofthehook.Eachhookhasa
definedsetofparametersandaspecifiedresulttype.
ToextendDrupal,amoduleneedsimplyimplementahook.WhenDrupalwishes
toallowinterventionfrommodules,itdetermineswhichmodulesimplementa
hookandcallsthathookinallenabledmodulesthatimplementit.
50.whatisDatabaseabstractionlayerinDrupal?
Allowtheuseofdifferentdatabaseserversusingthesamecodebase.
Drupalprovidesaslimdatabaseabstractionlayertoprovidedeveloperswiththe
abilitytosupportmultipledatabaseserverseasily.Theintentofthislayeristo
preservethesyntaxandpowerofSQLasmuchaspossible,whilelettingDrupal
controlthepiecesofqueriesthatneedtobewrittendifferentlyfordifferent
serversandprovidebasicsecuritychecks.
MostDrupaldatabasequeriesareperformedbyacalltodb_query()or
db_query_range().Moduleauthorsshouldalsoconsiderusingpager_query()for
queriesthatreturnresultsthatneedtobepresentedonmultiplepages,and
tablesort_sql()forgeneratingappropriatequeriesforsortabletables.
51.ExplainthemenusysteminDrupal?Purposeofmenus?
Definethenavigationmenus,androutepagerequeststocodebasedonURLs.
TheDrupalmenusystemdrivesboththenavigationsystemfromauser
perspectiveandthecallbacksystemthatDrupalusestorespondtoURLspassed
fromthebrowser.Forthisreason,agoodunderstandingofthemenusystemis
fundamentaltothecreationofcomplexmodules.
Drupalsmenusystemfollowsasimplehierarchydefinedbypaths.
Implementationsofhook_menu()definemenuitemsandassignthemtopaths
(whichshouldbeunique).Themenusystemaggregatestheseitemsand
determinesthemenuhierarchyfromthepaths.Forexample,ifthepathsdefined
werea,a/b,e,a/b/c/d,f/g,anda/b/h,themenusystemwouldformthe
structure:
a
a/b
a/b/c/d
a/b/h
f/g
Notethatthenumberofelementsinthepathdoesnotnecessarilydeterminethe
depthofthemenuiteminthetree.
Whenrespondingtoapagerequest,themenusystemlookstoseeifthepath
requestedbythebrowserisregisteredasamenuitemwithacallback.Ifnot,the
systemsearchesupthemenutreeforthemostcompletematchwithacallbackit
canfind.Ifthepatha/b/iisrequestedinthetreeabove,thecallbackfora/b
wouldbeused.
Thefoundcallbackfunctioniscalledwithanyargumentsspecifiedinthepage
argumentsattributeofitsmenuitem.Theattributemustbeanarray.Afterthese
arguments,anyremainingcomponentsofthepathareappendedasfurther
arguments.Inthisway,thecallbackfora/babovecouldrespondtoarequestfor
a/b/idifferentlythanarequestfora/b/j.
Foranillustrationofthisprocess,seepage_example.module.
Accesstothecallbackfunctionsisalsoprotectedbythemenusystem.Theaccess
callbackwithanoptionalaccessargumentsofeachmenuitemiscalledbefore
thepagecallbackproceeds.IfthisreturnsTRUE,thenaccessisgrantedifFALSE,
thenaccessisdenied.Menuitemsmayomitthisattributetousethevalue
providedbyanancestoritem.
InthedefaultDrupalinterface,youwillnoticemanylinksrenderedastabs.These
areknowninthemenusystemaslocaltasks,andtheyarerenderedastabsby
default,thoughotherpresentationsarepossible.Localtasksfunctionjustasother
menuitemsinmostrespects.Itisconventionthatthenamesofthesetasksshould
beshortverbsifpossible.Inaddition,adefaultlocaltaskshouldbeprovidedfor
eachset.Whenvisitingalocaltasksparentmenuitem,thedefaultlocaltaskwill
berenderedasifitisselectedthisprovidesforanormaltabuserexperience.This
defaulttaskisspecialinthatitlinksnottoitsprovidedpath,buttoitsparent
itemspathinstead.Thedefaulttaskspathisonlyusedtoplaceitappropriatelyin
themenuhierarchy.
Everythingdescribedsofarisstoredinthemenu_routertable.Themenu_links
tableholdsthevisiblemenulinks.Bydefaultthesearederivedfromthesame
hook_menudefinitions,howeveryouarefreetoaddmorewith
menu_link_save().
52.HowtointeractwithDrupalsearchsystem?
Therearethreewaystointeractwiththesearchsystem:
Specificallyforsearchingnodes,youcanimplementnodeapi(updateindex)and
nodeapi(searchresult).However,notethatthesearchsystemalreadyindexesall
visibleoutputofanode,i.e.everythingdisplayednormallybyhook_view()and
hook_nodeapi(view).Thisisusuallysufficient.Youshouldonlyusethis
mechanismifyouwantadditional,nonvisibledatatobeindexed.
Implementhook_search().Thiswillcreateasearchtabforyourmoduleonthe
/searchpagewithasimplekeywordsearchform.Youmayoptionallyimplement
hook_search_item()tocustomizethedisplayofyourresults.
Implementhook_update_index().ThisallowsyourmoduletouseDrupalsHTML
indexingmechanismforsearchingfulltextefficiently.
Ifyourmoduleneedstoprovideamorecomplicatedsearchform,thenyouneed
toimplementityourselfwithouthook_search().Inthatcase,youshoulddefineit
asalocaltask(tab)underthe/searchpage(e.g./search/mymodule)sothatusers
caneasilyfindit.
53.WhatisaModuleindrupal?
Amoduleissoftware(code)thatextendsDrupalfeaturesand/orfunctionality.
CoremodulesarethoseincludedwiththemaindownloadofDrupal,andyoucan
turnontheirfunctionalitywithoutinstallingadditionalsoftware.Contributed
modulesaredownloadedfromtheModulesdownloadsectionofdrupal.org,and
installedwithinyourDrupalinstallation.Youcanalsocreateyourownmodules
thisrequiresathoroughunderstandingofDrupal,PHPprogramming,and
DrupalsmoduleAPI.
54.ExplainUser,Permission,Roleindrupal.
Everyvisitortoyoursite,whethertheyhaveanaccountandloginorvisitthesite
anonymously,isconsideredausertoDrupal.EachuserhasanumericuserID,
andnonanonymoususersalsohaveausernameandanemailaddress.Other
informationcanalsobeassociatedwithusersbymodulesforinstance,ifyouuse
thecoreProfilemodule,youcandefineuserprofilefieldstobeassociatedwith
eachuser.
AnonymoususershaveauserIDofzero(0).TheuserwithuserIDone(1),which
istheuseraccountyoucreatewhenyouinstallDrupal,isspecial:thatuserhas
permissiontodoabsolutelyeveythingonthesite.
Otherusersonyoursitecanbeassignedpermissionsviaroles.Todothis,you
firstneedtocreatearole,whichyoumightcallContenteditororMember.
Next,youwillassignpermissionstothatrole,totellDrupalwhatthatrolecanand
cantdoonthesite.Finally,youwillgrantcertainusersonyoursiteyournew
role,whichwillmeanthatwhenthoseusersareloggedin,Drupalwillletthemdo
theactionsyougavethatrolepermissiontodo.
Youcanalsoassignpermissionsforthespecialbuiltinrolesofanonymoususer
(auserwhoisnotloggedin)andauthenticateduser(auserwhoisloggedin,
withnospecialroleassignments).Drupalpermissionsarequiteflexibleyouare
allowedtoassignpermissionforanytasktoanyrole,dependingontheneedsof
yoursite.
55.Explaintheconceptofnodeindrupal.
AnodeinDrupalisthegenerictermforapieceofcontentonyourwebsite.(Note
thatthechoiceofthewordnodeisnotmeantinthemathematicalsenseaspart
ofanetwork.)Someexamplesofnodes:
Pagesinbooks
Discussiontopicsinforums
Entriesinblogs
Newsarticlestories
EachnodeonyoursitehasaContentType.ItalsohasaNodeID,aTitle,a
creationdate,anauthor(auseronthesite),aBody(whichmaybe
ignored/omittedforsomecontenttypes),andsomeotherproperties.Byusing
modulessuchasthecontributedContentConstructionKit(CCK)module,thecore
Taxonomymodule,andthecontributedLocationmodule,youcanaddfieldsand
otherpropertiestoyournodes.
56.ConceptofCommentinDrupal.
Commentsareanothertypeofcontentyoucanhaveonyoursite(ifyouhave
enabledthecoreCommentmodule).Eachcommentisatypicallysmallpieceof
contentthatausersubmits,attachedtoaparticularnode.Forexample,each
pieceofdiscussionattachedtoaparticularforumtopicnodeisacomment.
57explainTaxonomyindrupal.
Drupalhasasystemforclassifyingcontent,whichisknownastaxonomyand
implementedinthecoreTaxonomymodule.Youcandefineyourown
vocabularies(groupsoftaxonomyterms),andaddtermstoeachvocabulary.
Vocabulariescanbeflatorhierarchical,canallowsingleormultipleselection,and
canalsobefreetagging(meaningthatwhencreatingoreditingcontent,youcan
addnewtermsonthefly).Eachvocabularycanthenbeattachedtooneormore
contenttypes,andinthisway,nodesonyoursitecanbegroupedintocategories,
tagged,orclassifiedinanywayyouchoose.
58.Howdatabasesystemofdrupalworks?
Drupalstoresinformationinadatabaseeachtypeofinformationhasitsown
databasetable.Forinstance,thebasicinformationaboutthenodesofyoursite
arestoredintheNodetable,andifyouusetheCCKmoduletoaddfieldstoyour
nodes,thefieldinformationisstoredinseparatetables.CommentsandUsersalso
havetheirowndatabasetables,androles,permissions,andothersettingsarealso
storedindatabasetables.
59.Explainthepathsystemofdrupal?
WhenyouvisitaURLwithinyourDrupalsite,thepartoftheURLafteryourbase
siteaddressisknownasthepath.WhenyouvisitapathinyourDrupalsite,
Drupalfiguresoutwhatinformationshouldbesenttoyourbrowser,viaoneor
moredatabasequeries.Generally,Drupalallowseachmoduleyouhaveenabled
onyoursitetodefinepathsthatthemodulewillberesponsiblefor,andwhenyou
choosetovisitaparticularpath,Drupalasksthemodulewhatshouldbedisplayed
onthepage.
Forinstance,thissite(drupal.org)is(ofcourse)builtwithDrupal.Thepageyou
arenowviewingishttp://drupal.org/node/19828,whosepathisnode/19828?.
ThemodulethatisresponsibleforthispathisthecoreNodemodule,sowhenyou
visitthispage,DrupalletstheNodemoduledeterminewhattodisplay.
Todeterminethepathtoaparticularpageonyoursite,forpurposesofcreatinga
link,gotothepageyouwanttolinktoandlookattheURLintheaddressbar.By
defaulttheURL,afterthebaseaddressofyoursite,willbeginwith?q=.When
CleanURLsareenabledyouwillseeadirectorystructureintheURL.Thepath
foruseinamenuitemisthepartoftheURLafterthesitesbaseaddressand
withoutthe?q=.
60.ExplainRegion,Block,Menuindrupal..
PagesonyourDrupalsitearelaidoutinregions,whichcanincludetheheader,
footer,sidebars,andmaincontentsectionyourthememaydefineadditional
regions.Blocksarediscretechunksofinformationthataredisplayedinthe
regionsofyoursitespages.Blockscantaketheformofmenus(whichare
concernedwithsitenavigation),theoutputfrommodules(e.g.,hotforumtopics),
ordynamicandstaticchunksofinformationthatyouvecreatedyourself(e.g.,a
listofupcomingevents).
TherearethreestandardmenusinDrupal:PrimaryLinks,SecondaryLinks,and
Navigation.PrimaryandSecondarylinksarebuiltbysiteadministrators,and
displayedautomaticallyinthepageheaderofmanythemes(ifnot,youcanenable
theirblockstodisplaythem).Navigationisthecatchallmenuthatcontainsyour
administrationmenus,aswellaslinkssuppliedbymodulesonyoursite.Youcan
alsocreateyourowncustommenus,anddisplaythembyenablingtheirblocks.
Youcancustomisemenusinseveralways,suchasreorderingmenuitemsby
settingtheirweightorsimplydraggingintoplace,renamingmenuitems,and
changingthelinktitle(thetooltipthatappearswhenyoumouseoveramenu
item).YoucanmoveamenuitemintoadifferentmenubyeditingtheParent
propertyofthemenuitem.
Youcanalsoaddcustommenuitemstoamenu,fromtheAddmenuitemtabof
theMenuadministrationscreen.Tocreateamenuitem,youwillneedtoprovide
thepathtothecontent(seeabove).
Inallcasesamenuitemwillonlybeshowntoavisitoriftheyhavetherightsto
viewthepageitlinkstoe.g.,theadminmenuitemisnotshowntovisitorswho
arenotloggedin.
101.WhathardwaredoesDrupal.orgrunon?
100.DrupalandWorkingwithJavaScript
99.WhydoesDrupalneedadatabase?Whatdatabase
98.HowtocreateastaticarchiveofaDrupalweb
97.ProgrammingbestpracticesandCMS(drupal)bes
96.whatareDrupalDistributionsandDrupalinst
95.Drupalcodingstandards
94.Drupal8classesandinterfaces
93.Explaindrupaladvancedsearch
92.Drupal8,Changelog.txtWhatsnewinDrupa
91.DrupalNegativesandexplanationonUsability,
90.ExplainDrupalArchitecture
89.DrupalVersionreleasedates
88.Drupalataglance
87.Whyyoushouldntmodifycoredrupalfiles?
86.Explainhardcodingindrupal?
85.ExplainTheminginDrupal8?
84.Stepsforlaunchingadrupalsite?
83.Explaindrupaladministration
82.Howtoconfigure.htaccesstoignorespecific
81.Whatarethestepsformigratingdrupalwebsit
80.Howtoinstallandconfiguredrupal8?
79.HowtoInstallDrupal?
78.Whatarealpha,betareleasesandreleasecand
77.Whatdoversionnumbersindrupalmean?
76.ExplainBackwardCompatibilityinDrupal?
75.ExplainSecurityfeaturesofDrupal?
74.WhatareEntitytypesindrupal?
73.WhatisBootstrapindrupal?
72.Whatisdrupalweight?
71.Whatistriage?
70.Whatisdrupaltrigger?
69.Whatisthemeandthemeengineindrupal?
68.Whatisteaserindrupal?
67.Whatisrenderarrayindrupal?
66.Whatisdrupalregion?
65.Whatispermissionindrupal?
64.WhatisGitindrupal?
63.WhatisDrupalConandDruplicon?
62.Whatiscronindrupal?
61.Whatiscriticalpath?
DRUPALInterviewQuestionsandAnswerspdffree
download::
(http://interviewquestionsanswerspdf.com/category/drupalinterviewquestions/) LeaveaComment
(http://interviewquestionsanswerspdf.com/2014/06/drupalinterviewquestionsandanswers/#respond)
101TOPDRUPALInterviewQuestionsandAnswerspdf(http://interviewquestionsanswerspdf.com/tag/101
topdrupalinterviewquestionsandanswerspdf/)
WherejQuerycodeisgettingexecuted?
(http://interviewquestionsanswerspdf.com/2014/06/wherejquerycodeis
gettingexecuted/)
Whatis@interface?
(http://interviewquestionsanswerspdf.com/2014/06/whatisinterface/)
ADDCOMMENT
Requiredfieldsaremarked*.Youremailaddresswillnotbepublished.
Comment
Name*
EmailAddress*
Website
POSTAQUESTION
Notifymeoffollowupcommentsbyemail.
Notifymeofnewpostsbyemail.
< >
www.titan.co.in
INTERVIEWQUESTIONSANSWERSPDF****LIKE***
InterviewQuestionsAnswers
214likes
LikePage Share
Bethefirstofyourfriendstolikethis
InterviewQuestionswithAnswerspdffreedownloadforfreshersexperiencedMCQsRealtimecertificationbasicaskedprogramming
onIT&NONITPlacementPapers