Comments (14)
I'm not able to recreate this. This needs to be tried on a modern browser without extensions running to verify.
from govcms7.
Issue is caused by HTML browser form validation.
Produced on:
- Chrome Version 43.0.2357.132 (no extensions enabled)
- Firefox 39 (no extensions enabled)
Telling me to fill in the hidden PostgreSQL on Firefox when clicking submit:
from govcms7.
Just also tried to install govcms and had the same problem. Firefox on linux mint. As noted workaround was to just to fill in the postgreSQL fields even though I am using MySQL.
from govcms7.
Reopening this issue as it seems more widespread than first thought. From any of the affected users, is this govCMS specific or do you also experience this installing Drupal minimal/standard profiles.
from govcms7.
The module https://www.drupal.org/project/accessible_forms adds in the HTML5 required attribute, this looks like the cause of the issue. Perhaps a simple solution is to make the the PostgreSQL fields not mandatory (through hook_form_FORMID_alter).
from govcms7.
Would this module be active during site install? Does Drupal boot all modules prior to anything being installed? If that's the case we should probably also decide whether this is a module bug.
from govcms7.
You see the red "(mandatory)" in the screenshot - I believe the module accessible_forms does this.
from govcms7.
In themes/govcms/govcms_zen/template.php line #205 it has:
$variables['element']['#attributes']['required'] = 'true';
Which adds the required="true" attribute
All browsers except Safari will respect this attribute to prevent the from from submitting
A simple fix could be in install.js, add:
for(var f=document.forms,i=f.length;i--;)f[i].setAttribute("novalidate",i)
Which will only disable browser's form validation during installation. All other form validations after installation are not affected.
from govcms7.
Should we also consider a template.php option instead of js?
/**
* Adds accessibility attributes.
*/
function govcms_zen_preprocess_aria_invalid(&$variables) {
if (!empty($variables['element']['#required']) && !drupal_installation_attempted()) {
$variables['element']['#attributes']['required'] = 'true';
}
if (isset($variables['element']['#parents']) && form_get_error($variables['element']) !== NULL && !empty($variables['element']['#validated'])) {
$variables['element']['#attributes']['aria-invalid'] = 'true';
}
}
from govcms7.
The reason I was not able to replicate this before was because I do not have php pgsql drivers. When I remove the autofilled field from the SQLite settings, then attempt to proceed with MySQL settings only I see the issue.
The issue is not observed when commenting out line 205 in template.php of govcms_zen (thanks @jozhao)
from govcms7.
Do we have an agreed approach to this? Either the addition in the code @typhonius posted above, or commenting out/removing the line?
from govcms7.
Is this still a thing, lads?
from govcms7.
My 2 cents
@typhonius Please commit your solution ASAP
from govcms7.
Can someone test #92 ?
from govcms7.
Related Issues (20)
- GovCMS Drupal 7 - Updates, Support, End of Life November 2022
- Update UUID to 7.x-1.1 HOT 1
- Field Groups not created properly in PHP7.1 HOT 2
- Checkboxes not visible on admin forms using default Shiny theme.
- Consider adding flood_control and flood_unblock modules in the distro. HOT 1
- Update Drupal core to 7.61 HOT 2
- Include an easy solution for implementing mega menus HOT 1
- Behat test failing - year dropdown HOT 1
- XML Sitemap: An unknown error has occurred (805303f4)
- Webform email "include files as attachments" function broken in govCMS 7.x-3.7 HOT 1
- PHP Notice in hierarchical_select module HOT 3
- Upgrade xmlsitemap to 7.x-2.6 HOT 3
- Upgrade Funnelback Search Integration to 7.x-4.0-beta5 HOT 1
- What does PHP 7.2 mean to govCMS 7 sites? HOT 2
- Logs flooded with warning messages "Invalid display settings encountered" HOT 2
- Remove the SCAYT plugin from CKEditor - rely on the native browser spellchecker instead.
- How does Solr search work in govCMS platforms? HOT 4
- Patch redis module to force a timeout HOT 1
- Facet block titles display for empty facets HOT 1
- Bean update 7.x-1.13 Causes Duplicate Headers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from govcms7.