Account created on 8 February 2021, over 3 years ago
#

Recent comments

Thank you for taking time to look into this.
The solution was trivial. In 2.0, page.twig is changed and does not use the font awesome character to show the hamburger symbol. It now uses svg to draw it . I copied the required lines from the template into my old template, and now I am good.
Thanks for the great theme.

That could be a good developer solution. I do not doubt that.

However, my question is how would a normal admin person (not a developer) provide two different string translations for the same English string... one for singular and one for plural... Can this be done in a normal 'Drupal' way? That should be a cleaner solution, in my thinking.

Has anybody else faced/solved this problem?

Thanks gilse, it worked for me

I am adding this info (puzzle_sol) to node in hook_node_storage_load and was expecting to locate it in a foreach loop as follows:

$node = $variables['elements']['#node'];
foreach($node as $key => $value){
...
if (isset ($node['puzzle_sol']) {

etc etc

however this loop was not catching it (probably it was attached as object property ... not a class property ... I guess that is the reason)
When I tried to access it as $node->puzzle_sol .........I got it.

I now should be able to add template suggestion based on this.

(Please let me know if you think of any better way to achieve this)

Thanks

This got solved accidentally. See this comment in the drupal forum:
solved (accidently!!)

This was very trivial issue .... it seems.

I was trying to use old and new w3css thems (1 and 2) keeping them in different folders and creating a symlink to one of these at a time.

I did the same for my theme (two folders and two symlinks )

The whole strategy worked quite well ... till it got stuck on the following

Drupal was somehow having my old storm.theme file as the extension file. (When I put a get_included_files() and logged the list of included files, it listed storm.theme file from the old folder) It seems include_once resolves the path through symlinks and lists that path instead of the used symlink. This helped me understand that old file was "stuck" somewhere.

Now the question was how to remove it from there. This also got solved "luckily". I put a 'syntax error' in the old storm.theme file and tried to access the page. It crashed showing the exact same syntax error. And when it had this error, it seams, it trashed the 'stuck stuff' from the cache.......I knew this because that time onward when I access the page it is accessing storm.theme file from my new (desired) location.

So this problem came to a happy end..........but is there any 'official' way to clear out old theme settings? ...Remember I had even uninstalled the theme and installed again .... still the old file remained stuck.

See if you find a way to solve this. (I am out of this issue ....but now I see that the hook implemented by parent theme cannot be undone  by my hook ... I am looking to find way out of that.

Thanks to all of you who found some time to look into this.

I would like to 'play' with the core just to see where the theme files are picked up read and the stuff is built into the theme registry.
I tried to look at files in this folder
/core/lib/Drupal/Core/Theme/

but could not understand where files in the base theme and subtheme folders are read and the data is overwritten or overridden.

Please help me in locating this. .. so that I myself can have some insight why base file theme file is picked but my theme file is not picked when none of these two are used as admin themes

As advised above, I filed an issue

https://www.drupal.org/project/d8w3css/issues/3390171 💬 subtheme.theme file not recognized Fixed

for the w3css theme and got following explanation:

Hello,
I have this hook (hook_form_BASE_FORM_ID_alter()) used in the theme file drupal8_w3css_theme.theme line 444. This hook will work only on node add or edit and if you don't see any changes, that's because you are not using the theme as an admin theme.

You can create a custom module and use this hook inside it. recommended.
You can create a sub-theme to the active admin theme and you this hook inside. Not my choice.
You can use the w3css theme as an admin theme and you will see this code. Not recommended.

I attached the sub-theme I used for testing.
Best wishes,
Alaa

I still have this question:

I have understood this, that this hook will be used only if/when my theme is used as admin theme.

But then, the hook is still used from my base theme ..drupal8_w3css_theme, (even when that is not the admin theme either). I see that is getting used because the effect is to get the two column containerized node edit form. .. and also I could print a debug log message from drupal8_w3css_theme.theme file ... confirming that the hook is visited.

How does that work?

Please let me know this.

Thanks

flashwebcenter,

I hope I have understood this, that this hook will be used only if/when my theme is used as admin theme.

But then, the hook is still used from my base theme ..drupal8_w3css_theme, (even when that is not the admin theme either). I see that is getting used because the effect is to get the two column containerized node edit form. .. and also I could print a debug log message from drupal8_w3css_theme.theme file ... confirming that the hook is visited.

How does that work?

I tried

  1. storm.theme file
  2. theme-settings.php file in .../themes/custom/storm  directory
  3. uninstall storm theme and reinstall it

the hook overriding is not effective ... because the file is not recognized.

Please help

Thanks in advance

gisle and fkelly12054@gmail.com,

I do appreciate and admire the way Drupal is built and is progressing. I am using Drupal for last about 19-20 years and will continue to use it. ... and yes, eventually I will go for the composer - drush route in using Drupal.

Currently I am fixing the issues by hand and my progress is good so far.

After I did all those steps and got my site working as a bare-bones html page, this is my progress:

  1. the page was not getting rendered at all ... because after the update.php step, No theme was set as default. I set the default theme as my theme as in Drupal 9 and.... everything appeared quite well.
  2. It started throwing errors and I fixed them. Particularly error for EntityQuery access check. Here I had to set
    ->accessCheck(TRUE).
  3. It complained about global function render() ... I had to set it as \Drupal::service('renderer')->render(...)

After this site is behaving normally. However I will continue to test more and more and inform here.

Thanks

-Mahesh

gisle,

Thanks for your response.

Subsequent to this is what I did:

  1. enabled error logging in index.php
  2. reloaded update.php ...got white screen but got errors in /var/log/appache2/....._error.log file for my site
  3. Showed incompatibility for a method with ":array" return type expected and not found. ... I fixed this
  4. Then it showed missing function drupal_get_path ... I fixed this by using service syntax as shown somewhere on drupal.org
  5. update.php started showing results after this. It threw errors on color and rdf modules...........I uninstalled them (I was not using them) . It did not like seven admin theme. ... I changed admin theme to claro. and uninstalled seven.
  6. It showed errors in my custom modules and themes .that they were not for drupal 10 ..... I addd || ^10 wherever such was required.
  7. update.php seemed satisfied with this and went ahead and upgraded whatever it intended to update and told me to go to main page.
  8. Now my site is coming up as Drupal 10 site ... however it is not rendering as earlier.... all is shown in a 'barebones' html page.
  9. I believe I need to work on downloading recent versions of the contributed theme and proceed

So far so good. I will now go ahead with 'fixing' the theming part and will try to keep this forum posted ... This may help anybody if they are stuck in a similar situation.

Thanks

-Mahesh

Production build 0.69.0 2024