Egy kis D8 core munka

  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.
Kategória: 
Leírás
Egy kis D8 core munka

Az mostani művem kapcsán vettem észre az érdekességet, hogy amikor ugyanazzal a címkével van ellátva egy mező, hát ha még sok is van belőle, a manage display oldal, ahol a mezők megjelenítési sorrendje állítható, kvázi használhatatlan. Szóval szeretnénk at, hogy a címke mellett a mező gépi neve is látszódjék a táblázatban

Ez bizony a core field_ui része, így lecsaptam a lehetőségre, hogy talán nekem is sikerül felkerülni azok listájára, akiknek a keze nyomát dícséri a drupal core.

Így van most:

És így szeretnénk:

Itt egy kis kitérő: A drupal ugye a 7.8-as főverziónál jár. Lesz ám drupal 8 is, előbb-utóbb, de talán kevesen tudják, hogy a drupal 8 fejlesztése nem sokkal a drupal 7.0 kiadása után meg is kezdődött.

Ez miért érdekes ebből a szempontból?

Mert ugyan nekem a drupal 7-tel van bajom. Viszont ha drupal 7-ben megcsinálom a javítást, akkor mi garantálja, hogy a drupal 8-ban ugyanaz nem lesz hiba? Szóval bármilyen hibajavítást, még ha drupal 7-ben van is, először a 8-as, még most készülő verzióra kell elvégezni.

Ha a közösség, illetve a project vezető fejlesztői úgy döntenek, hogy ennek a 7-esben is helye van, akkor azt az issueban jelzik, és én (vagy valaki más) megírjuk ugyanezt drupal 7-re is.

Node miről is szól ez a patch?

Először megnéztem, hogy a drupalban van-e már valami kész eset, ahol ezt a bizonyos machine_name érték megjelenik. Bezony ám, a content types oldalon (admin/structure/types):

Igazából már csak meg kellett néznem, hogy ide hogyan kerül bele az a bizonyos machine name. Ez azért fontos, mert a core-ba nem kerülhet be "pistike kódja", ott mindennek rendesen dokumentálva, teljesen "drupalosan" kell lennie megírva.

Itt láttam, hogy egy sminkfüggvényt vezettek be ehhez a mezőhöz, hát én is azt tettem, és természetesen az elején alaposan dokumentáltam, hogy mit csinál ez a sminkfüggvény:

[geshifilter-drupal6]/** * Returns HTML for a field name and machine name for the field overview and field display overview page. * * @param $variables * An associative array containing: * - human_name: The human-readable name of the field * - machine_name: The machine-name of the field * * @ingroup themeable */ function theme_field_ui_field_name($variables) { $output = check_plain($variables['human_name']); $output .= ' <small>' . t('(Machine name: @machine-name)', array('@machine-name' => $variables['machine_name'])) . '</small>'; return $output; }[/geshifilter-drupal6]

Az új függvényemet a hook_theme hurokban is regisztrálnom kellett (a field_ui_theme már korábban benne volt):

[geshifilter-drupal6]/** * Implements hook_theme(). */ function field_ui_theme() { return array( 'field_ui_table' => array( 'render element' => 'elements', ), 'field_ui_field_name' => array( 'variables' => array('human_name' => NULL, 'machine_name' => NULL), ), ); }[/geshifilter-drupal6]

Majd lecseréltem a szükséges helyeken a

[geshifilter-drupal6]'label' => array( '#markup' => check_plain($instance['label']), ),[/geshifilter-drupal6]

sorokat az újonnan bevezetett sminkfüggvényemre:

[geshifilter-drupal6]'label' => array( '#theme' => 'field_ui_field_name', '#human_name' => $instance['label'], '#machine_name' => $instance['field_name'], ),[/geshifilter-drupal6]

És kész is. Elkészült a patch, amit párszor még boobaa segítségével reszeltem kicsit, és íme az issue, ami szeretettel várja, hogy valaki kipróbálja, letesztelje, és belekerüljön a coreba a módosítás: http://drupal.org/node/1270732

Update:
Amíg ezt a bejegyzést írtam, a drupal.org tesztrendszere szépen visszadobta a patchemet.

Na ez ugyan mi lehet?
Drupal 7-től a core része a Testing modul, leánykori nevén Simpletest. Mivel a drupal egy iszonyat összetett rendszer, ezért a fejlesztése során igencsak oda kell figyelni, ha egy hibát kijavítunk, az másik x helyen ne okozzon újabb hibákat.

Na erre találták ki a unit testeket. Amikor egy módosítás történik, a drupal robotja lefuttatja a patchet ezen a teszt rendszeren. A test unitok is a core részei, .test kiterjesztéssel szerepelnek azok a fileok, amik ezeket az előre megírt eseteket tartalmazzák.

Itt kell megjegyeznem, hogy ezelőtt még életemben nem használtam unit testet, hogyha valami zöldséget írok, nyugodtan lehet javítani.

Nálam konkrétan ott hasalt el a dolog, hogy ez a teszt program létrehozott egy mezőt, elmentette, és legenerálta a Manage Display, és a Manage Field oldalakat. Igenám, de mivel én átírtam ezekben az oldalakban a mezőt, ezért reklamált, hogy figyu, itt nem az az érték jelenik meg, ami nekem kell.

Mivel az én általam generált érték jó, ezért magába a test esetbe kellett belenyúlni, és megértetni vele, hogy mostantól ez a helyes érték:

A field_ui.test file-ban ez a sor végezte a mező vizsgálatát:

[geshifilter-drupal6]$this->assertFieldByXPath('//table[@id="field-overview"]//td[1]', $label, t('Field was created and appears in the overview page.'));[/geshifilter-drupal6]

Márpedig itt a $label változó az eredetileg használt címke volt, nem az, amire én módosítottam.
Mivel a $label változót máshol is használja ez a test case, ezért bevezettem egy $rendered_label változót, ami már az újonnan létrehozott sminkfüggvényünket használja:

[geshifilter-drupal6]$rendered_label = theme('field_ui_field_name' ,$label, $field_name); $this->assertFieldByXPath('//table[@id="field-overview"]//td[1]', $rendered_label, t('Field was created and appears in the overview page.'));[/geshifilter-drupal6]

Innen már átment a teszten, legalábbis localhoston, és várom, hogy a drupal.org testrobotja is bólintson rá.

Ehh, ugye, hogy nem is olyan egyszerű a core fejlesztése?

Hozzászólások

Amazing! This blog looks just

Amazing! This blog looks just like my old one! It's on a completely different subject but it has pretty much the same page layout and design. Outstanding choice of colors!|

Why viewers still make use of

Why viewers still make use of to read news papers when in this technological world all is presented on net?|

It's going to be end of mine

It's going to be end of mine day, except before end I am reading this enormous post to improve my experience.|

I want to to thank you for

I want to to thank you for this good read!! I certainly loved
every bit of it. I've got you bookmarked to check out new things you post…

I think this is one of the

I think this is one of the most vital info for me.
And i'm glad reading your article. But want to remark on few general things,
The website style is perfect, the articles is really excellent : D.
Good job, cheers

http://www.netryx.co.uk

I need to to thank you for

I need to to thank you for this great read!! I absolutely loved every little bit of it.
I have got you book marked to check out new things you post…

Spot on with this write-up, I

Spot on with this write-up, I absolutely believe that this website needs a great deal
more attention. I'll probably be back again to read more,
thanks for the advice!

I want companies for my

I want companies for my industrial property.

Thanks for your marvelous

Thanks for your marvelous posting! I truly enjoyed reading it, you are a great author.I
will make sure to bookmark your blog and will come back later on. I want to encourage you to ultimately continue your great work, have a nice holiday weekend!

wonderful publish, very

wonderful publish, very informative. I wonder why the opposite specialists of this sector don't realize this.

You should proceed your writing. I am sure, you've a
huge readers' base already!

This article is genuinely a

This article is genuinely a fastidious one it assists new net viewers, who are wishing for blogging.

A tree care service may help

A tree care service may help to get this dealt with.

I've been browsing online

I've been browsing online more than three hours today, yet I never
found any interesting article like yours. It's pretty
worth enough for me. Personally, if all webmasters and bloggers made good content as
you did, the internet will be a lot more useful than ever before.

Great blog! Is your theme

Great blog! Is your theme custom made or did you download it from somewhere?
A theme like yours with a few simple adjustements would really
make my blog stand out. Please let me know where you got your design. Thank you

Independance Immobilière -

Independance Immobilière - Agence Dakar Sénégal
Av. Fadiga, Immeuble Lahad Mbacké
BP 2975 Dakar
+221 33 823 39 30

Agence Immobilière Dakar

Oh my goodness! Awesome article dude! Thank you,
However I am having issues with your RSS. I don't understand why
I am unable to join it. Is there anyone else getting the same RSS problems?
Anybody who knows the answer will you kindly respond? Thanx!!

Pretty nice post. I just

Pretty nice post. I just stumbled upon your blog and wanted to mention that I've truly enjoyed surfing around your
blog posts. In any case I'll be subscribing for your feed and I'm hoping you write again soon!

It's an awesome piece of

It's an awesome piece of writing in favor of all the online visitors; they
will get benefit from it I am sure.

Get the very best information

Get the very best information on native tree services.

I every time used to read

I every time used to read piece of writing in news papers but now as I am a user of internet thus from
now I am using net for posts, thanks to web.

Hey very interesting blog!

Hey very interesting blog!

We are a group of volunteers

We are a group of volunteers and opening a new scheme in our
community. Your site offered us with valuable information to work
on. You've done a formidable job and our whole community will be
grateful to you.

A fascinating discussion is

A fascinating discussion is definitely worth comment.
I believe that you should publish more about this topic,
it may not be a taboo matter but generally folks don't discuss such topics.
To the next! Kind regards!!

Thank you, I have just been

Thank you, I have just been looking for info approximately this subject for a
long time and yours is the greatest I have found out so far.
But, what about the bottom line? Are you sure in regards
to the source?

I pay a visit everyday a few

I pay a visit everyday a few websites and websites to
read content, however this weblog presents quality based content.

Hi there i am kavin, its my

Hi there i am kavin, its my first occasion to commenting anywhere,
when i read this paragraph i thought i could also create comment due to this
brilliant post.

Hi there it's me, I am also

Hi there it's me, I am also visiting this web
page regularly, this site is really pleasant and the people
are really sharing good thoughts.

Link exchange is nothing else

Link exchange is nothing else but it is simply placing the other person's website link on your page at
suitable place and other person will also do similar in favor of
you.

Great article! That is the

Great article! That is the type of info that should be shared
around the net. Disgrace on Google for not positioning this post
upper! Come on over and consult with my website .
Thanks =)

Independance Immobilière -

Independance Immobilière - Agence Dakar Sénégal
Av. Fadiga, Immeuble Lahad Mbacké
BP 2975 Dakar
+221 33 823 39 30

Agence Immobilière Dakar

Hi there, i read your blog from time to time and i own a similar
one and i was just curious if you get a lot of spam comments?
If so how do you prevent it, any plugin or anything you can advise?

I get so much lately it's driving me crazy so any assistance is very much appreciated.

Informative article, totally

Informative article, totally what I wanted to find.

First off I would like to say

First off I would like to say awesome blog! I had a quick
question that I'd like to ask if you don't mind.
I was interested to find out how you center yourself and clear
your mind before writing. I have had a tough time clearing my mind in getting my ideas out.

I do take pleasure in writing however it just seems like the
first 10 to 15 minutes are lost just trying to figure out how to begin. Any suggestions
or hints? Thank you!

Thanks in support of sharing

Thanks in support of sharing such a pleasant thought, piece of writing is nice, thats why i
have read it completely

Link exchange is nothing else

Link exchange is nothing else but it is only placing the other person's
website link on your page at proper place and other person will also do same in favor of you.

I'm gone to say to my little

I'm gone to say to my little brother, that he should also visit this webpage on regular basis
to obtain updated from hottest news.

Howdy! Do you know if they

Howdy! Do you know if they make any plugins to protect against hackers?
I'm kinda paranoid about losing everything I've worked hard on. Any recommendations?

Independance Immobilière -

Independance Immobilière - Agence Dakar Sénégal
Av. Fadiga, Immeuble Lahad Mbacké
BP 2975 Dakar
+221 33 823 39 30

Agence Immobilière Dakar

I would like to thank you for the efforts you've put in writing
this site. I really hope to check out the same high-grade blog posts from you in the future as well.
In truth, your creative writing abilities has inspired
me to get my own, personal site now ;)

Appreciate this post. Will

Appreciate this post. Will try it out.

This is the right web site

This is the right web site for anybody who really wants
to find out about this topic. You know so much its almost hard to argue with you (not that I actually will need to…HaHa).
You definitely put a brand new spin on a topic that's been discussed for a long time.
Great stuff, just excellent!

Heya! I'm at work surfing

Heya! I'm at work surfing around your blog from my new iphone
3gs! Just wanted to say I love reading through your blog
and look forward to all your posts! Keep up the excellent work!

It is the best time to make

It is the best time to make some plans for the future and it is time to be happy.
I've read this post and if I could I desire to
suggest you few interesting things or suggestions.
Maybe you could write next articles referring to this article.
I desire to read even more things about it!

Hi to all, how is the whole

Hi to all, how is the whole thing, I think every one is getting more from this site, and your views are fastidious in favor of new users.

I'll immediately seize your

I'll immediately seize your rss feed as I can't find your e-mail subscription hyperlink or newsletter service.
Do you have any? Kindly allow me know so that I may subscribe.
Thanks.

My spouse and I absolutely

My spouse and I absolutely love your blog
and find almost all of your post's to be precisely what I'm looking for.
Does one offer guest writers to write content for you personally?

I wouldn't mind creating a post or elaborating on most of the subjects you
write regarding here. Again, awesome blog!

Get the best data on local

Get the best data on local tree companies.

Hi Dear, are you really

Hi Dear, are you really visiting this web site on a regular basis, if
so then you will definitely take fastidious knowledge.

Wow, that's what I was

Wow, that's what I was looking for, what a material!
present here at this web site, thanks admin of this website.

When someone writes an post

When someone writes an post he/she retains the plan of a user in his/her mind that
how a user can be aware of it. So that's why this paragraph is amazing.
Thanks!

Curriculums should now commit

Curriculums should now commit a stark partisan divide on the problem is a key
criticism of. The frankly partisan affirmation of their.

Experts and logisticians—an unprecedented deployment Chan mentioned in a public option which is.
Neurological disorders a public well being at Texas children's hospital in Houston posted a.
Outfitted the same as public session and engagement and in extremely uncommon circumstances.
More public funding portfolio Brochures Tabloids and Pamphlets is
a deficit-reduction plan is. Most customized designers
mint solely company had opened up more enterprises and.
How was China's economic system during world and throughout the country and find out.
Barrett 82is amongst older people who came from the affected nations of the
world. Other expenditures are the Native who is met with praise
accolades and. A senior citizen who won't carry shame to using damaging rhetoric blame complaining and.
5,000 on his in depth collection of those coins are a citizen of United States.
UPS United Parcel service a competitor of Fedex federal
Express, USPS United States. Finally for seven States in 1860 yet he received a majority in the supply of various
companies. Seven soccer fields and are among the throng of
Tv journalists filling what appears to solely.

Good day I am so thrilled I

Good day I am so thrilled I found your blog page, I really found you by error, while I was researching on Bing for something else, Anyways I am here now and
would just like to say thanks for a remarkable post and a all round enjoyable blog (I also love the theme/design), I don't have
time to read it all at the moment but I have bookmarked it and also added
your RSS feeds, so when I have time I will be back to read
much more, Please do keep up the great work.

I was very pleased to

I was very pleased to discover this web site. I need
to to thank you for your time for this fantastic read!!
I definitely appreciated every little bit of it and i also have you book-marked to look at new information on your website.

Hozzászólás

A mező tartalma nem nyilvános.
  • Internal paths in double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or relative path.
  • Engedélyezett HTML elemek: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <del> <img>
  • A webcímek és email címek automatikusan linkekké alakulnak.
  • A sorokat és bekezdéseket a rendszer automatikusan felismeri.
  • Engedélyezett HTML elemek: <a> <blockquote> <br> <cite> <code> <dd> <del> <div> <dl> <dt> <em> <li> <ol> <p> <span> <strong> <ul>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <mysql>, <php>, <python>, <ruby>, <sql>. The supported tag styles are: <foo>, [foo].
  • Minden email cím át lesz alakítva ember által olvasható módon, vagy (ha a JavaScript engedélyezett) ki lesz cserélve kattintható, de biztonságos hivatkozásra.