0

I updated my Drupal 8 website from 8.2 to 8.3. I have a module that has a block and includes a configuration form which has various data form fields. The block of the module appears to work fine. But when I try to update any of the configuration data it simply doesn't change anything! Something to do with not updating the database, maybe?

Example: I want to change the modules block name. The old name is "oldname" and I want it to be "newname". After typing in the new name on the configuration page and clicking save the name will still remain "oldname".

There is not a single error within Drupal or my servers log file that would explain this. Is there anywhere else I can look to find what the problem is?

What's changed with the new version of Drupal that might cause this?

After searching for awhile and cleaning out some old modules from the database I've finally come across an error relating to forms. It' quite long but here's the first part: Warning: strip_tags() expects parameter 1 to be string, array given in Drupal\favorites\Form\AddForm->buildForm()

3
  • You flushed/cleared the cache, right?
    – No Sssweat
    Commented Apr 12, 2017 at 4:59
  • Yes of course :) I always clear it with drush. Everything works fine apart from updating this one module :(. I was getting a "PHP Deprecated: Unknown: Use of mbstring.http_input is deprecated in Unknown on line 0" error for awhile but thats now gone since I've changed the php version. I've tried updating the module using 3 diffirent php versions just incase my hosting provider changed it on me. But still no luck :/
    – Krypton
    Commented Apr 12, 2017 at 5:03
  • A little more info: when trying to change info on the config page it reloads the config page with the old values(instead of the new ones) which leads me to believe that data isn't even making it to the database :(.
    – Krypton
    Commented Apr 12, 2017 at 5:14

1 Answer 1

0

Use drush config-edit, as stated in the docs.

Or implement an upgrade path for you module, see hook_update_N.

6
  • I don't see how this answers my question? Yes drush config-edit can be used to edit my modules settings but I'd prefer the browser version to work. What am I updating with hook_update_N? What's changed with the new version of Drupal?
    – Krypton
    Commented Apr 12, 2017 at 7:30
  • what method do you use in the browser (drupal.org/project/config_update) ? don't know about a change. here's more about the hook_update_N: drupal.org/docs/8/api/update-api/…. This is meant when you want to deploy the change also to other instances ..
    – rémy
    Commented Apr 12, 2017 at 8:33
  • No I use /admin/structure/block/manage/module_name to update the module. Isn't hook_update_N for module code changes? How does this work if it's drupal core that's changed something? I have no idea why the config page won't update. I'd use drush config-edit if I could but there's just too much data in the config. Thanks for the help.
    – Krypton
    Commented Apr 12, 2017 at 10:04
  • I think I may be making some progress. In drush config-edit when I try and update the yml file I get two errors. Configuration <em class="placeholder">colorbox.settings</em> depends on the <em class="placeholder">Colorbox</em> module that will not be installed after import. Configuration <em class="placeholder">ng_lightbox.settings</em> depends on the <em class="placeholder">ng_lightbox</em> extension that will not be installed after import. Why will neither of these be installed after import? I'm not sure I even use either of these modules..
    – Krypton
    Commented Apr 12, 2017 at 11:41
  • I believe the problem with drush config-edit is that there's some junk data in the database for modules Colorbox and ng.lightbox. I must have not properly uninstalled them and after updating drupal thinks that they're installed, when they're not. I've managed to update the module "Title" via drush config-edit but the modules website configuration page still won't work. I'm going to try and clean all traces of those two plugins out of the database and see what happens.
    – Krypton
    Commented Apr 12, 2017 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.