Quantcast
Channel: User acrosman - Stack Overflow
Browsing latest articles
Browse All 44 View Live

Comment by acrosman on Opencart 2.x access product only by link

Edited for clarity.

View Article



Comment by acrosman on Click button and toggle the button label

Since your tags include Salesforce references I suggest you take a look at their training materials for Lightning Web Components: trailhead.salesforce.com/en/content/learn/modules/…. Their approach is...

View Article

Comment by acrosman on How to pass a Salesforce html formula URL prefilled...

Welcome to StackOverflow. First you want to make sure you are getting the right value from your prefill connector. If you just put the value into a field and display it, do you get the value you...

View Article

Comment by acrosman on Why I get html code when I send email in php?

Toby, Welcome to StackOverflow. In addition to @tadman's entirely correct comments about the queries, your code is also using md5 hash on your passwords (unsalted at that). md5 has not been considered...

View Article

Comment by acrosman on Drupal 8 or 9 Save data to the content type from a...

So if you remember CCK from 5 (or flexinode in 4.x), that went into core back in D6, and really changed how the platform works. Things that used to require custom modules became click-based config. And...

View Article


Comment by acrosman on Trouble getting Salesforce login working with...

I believe JSForce's authentication from the browser is meant to handle the OAuth directly, not through an underlying framework. I expect you need to remove JSForce from the project entirely and...

View Article

Comment by acrosman on Apex Code to get input value from opp using before...

If you are trying to compare at the data before and after the update you likely will be able to find what you want in new and old context variables. Try describing what you want to do with the data...

View Article

Comment by acrosman on Want to restrict the local machine IP,Instead of local...

It sounds like you are trying to host images related to a contact on one service and only allow access if they are logged into Salesforce. You can do that, but not through IP restrictions or file...

View Article


Comment by acrosman on Twilio Salesforce Integration for calls and transcribe

Welcome to StackOverflow. Sounds like you were given a rather large complex first project. There is a AppExchange package, and you probably want to see if that meets your needs before implementing...

View Article


Comment by acrosman on How to alternate between strings to make new array?

Can you shared what you've tried so far and where you got stuck?

View Article

Comment by acrosman on Keep modal window open when reCAPTCHA not ticked in...

You might find better support on the Drupal StackExchange site or Drupal Slack.

View Article

Comment by acrosman on How to integrate Amazon Alexa with Salesforce Einstein...

You might try to Salesforce Trailhead materials on Alexa as a starting point: trailhead.salesforce.com/en/content/learn/trails/… You'll get better help here once you have some code started.

View Article

Comment by acrosman on Salesforce BULK upload always fails

Have you looked at the data file to see if that text appears? Depending on how you generated the file it's possible you have a whole string of ----- in there meant for separating sections visually.

View Article


Comment by acrosman on JSForce Integration with Angular Failed to compile....

Welcome to StackOverflow. It would help if you added a little more of the code you are using (unless the import statements really are your entire code base). Having a minimal example of what is...

View Article

Comment by acrosman on Salesforce Apex Testing Code Coverage Issues for...

Welcome to Stackoverflow. In addition to review the resources provided in the previous comment, it would be helpful to know what test class you tried to create. Looks like you code already has the...

View Article


Answer by acrosman for How do I programmatically set cache age for a module...

To your block's render array you can add cache settings:'#cache' => ['max-age' => 60 * 60 * 24,],Time here is measured in seconds. See Also:...

View Article

Answer by acrosman for Drupal 8, http request to server and append to the site

If you want the content to be part of the DOM when it is sent to the browser this is not something you want to do in Twig, you should have the content loaded earlier in the process.You can create a...

View Article


Answer by acrosman for EntityFieldQuery can do automatic trimming on...

If you really are looking to just trim white space, you can simply pass the tested value through PHP's trim():...->fieldCondition('field_news_types', 'value', trim($news_type), '=')...If you need to...

View Article

Answer by acrosman for Drupal AJAX won't work on Google Chrome on Android...

Chrome is timing out before the site returns results, therefore the solution is basically: "get there faster". Make sure the site's caching is enabled and working properly, and that you have sufficient...

View Article

Answer by acrosman for Do I need a htaccess to be able to use this module?

Boost can be run on IIS, but the configuration directions are a bit different. If boost is already working in other conditions, and a manual cache clear resolves your issues it is likely not related to...

View Article

Answer by acrosman for Drupal 8 (with twig) development

If you are going to have multiple devs actively working on multiple sites with a shared database odd bugs like this are going to come up. Likely a cache rebuild will resolve it, but a similar error may...

View Article


Answer by acrosman for drupal 7 | db_select | date_field condition

To select a collection of nodes based on field values you should use EntityFieldQuery instead of db_select(). db_select() is a simple query writing tool that assumes you know the storage structures...

View Article


Answer by acrosman for Allow only one click on login button

You can use hook_form_alter() to modify the user login form. To attach JS to any form using form alter you can add an #attached element to the array: $form['#attached']['js'] = array(...

View Article

Answer by acrosman for Drupal 8 Double Field HTML

It appears there is support in the works, but that the patch isn't ready for inclusion in the module yet. Your best option is likely to help finish work on the patch.

View Article

Answer by acrosman for Applying CSS to Drupal

With Drupal (and CMS's in general) you need to look at the patterns that are generated by the theme to write your selectors. Whenever possible (and with Drupal's default themes it's nearly always...

View Article


Answer by acrosman for Error during installation of Drupal 7 on...

If you don't have shell access: stop and get a better host. Chose one that will give you shell access, or provides Drupal hosting as a service (like Pantheon or Platform.sh which provide you...

View Article

Answer by acrosman for How do I enable aggregate CSS and JavaScript in Drupal...

To set configuration in Drupal 8 through drush the command name changed:drush config-set <config-name> <key> <value>The CSS and JS settings are part of system.performancedrush...

View Article

Answer by acrosman for Can't append element

I've seen issues where some browsers don't respect some changes when you do them directly (by which I mean creating the HTML from text like you're trying with the script tag), but when you do them with...

View Article

Answer by acrosman for how to fix redirected you too many times?

Make sure the site's main .htaccess file's rewrite_base directive is set correctly. Also if there are redirects within the site's vhost container make sure those are not conflict with the settings in...

View Article



Answer by acrosman for Use VBO in Drupal to update custom user field

In Drupal you do not want to update the database fields directly unless you created the table. Drupal's internal APIs provide a collection of tools to ensure you update the values correctly and that...

View Article

Answer by acrosman for Python scripts will only run in PyCharm

At this point any time you say "my script doesnt even have anything to do with unicode" you are almost certainly wrong. Your code file is most likely saved as UTF-8 therefore making your script itself...

View Article

Answer by acrosman for How to generate and mail the permanent password in...

Emailing a user password after initial registration can be done, but by default Drupal makes this process hard since emailing passwords is a poor security practice. Instead Drupal emails a password...

View Article

Answer by acrosman for How to get an image srcset inside page.html.twig in...

Getting access to all the node information at the page template level generally means large and painful selectors and extra rendering. It's generally easier to create a helper function and hook within...

View Article


Answer by acrosman for Why is PHP printing my number in scientific notation,...

Use number_format() to get what you're after:print number_format($var, 5);Also check sprintf()

View Article

Answer by acrosman for What is the difference between bindParam and bindValue?

The answer is in the documentation for bindParam:Unlike PDOStatement::bindValue(), the variable is bound as a reference and will only be evaluated at the time that PDOStatement::execute() is called....

View Article

Answer by acrosman for PHP coding standards

Use a template engine when you can. If you haven't learned one, or don't want the overhead (which is minimal), use practices that cause you to have quick-and-dirty templating:Functions that do not...

View Article


Answer by acrosman for How to determine if a class method exists

Sounds like you probably want a custom plugin manager.In Drupal 8 (and now 9) instead of implementing custom hooks and searching, you can instead create a plugin manager service and then implement...

View Article


Answer by acrosman for Browser error when embedding Drupal 7 site as iframe -...

Instead of using the straight PHP header functions you want use Drupal's header functions. In particular you can use drupal_add_http_header to add a replacement to the...

View Article

Answer by acrosman for Get parent menu item of a current node

loadLinksByRoute returns an array of \Drupal\Core\Menu\MenuLinkInterface. So when you called:$menu_link_manager->loadLinksByRoute()You got back an array not an object (Drupal frequently returns...

View Article

Answer by acrosman for Query Accounts based on Search String

To search across an object like that you want to use a SOSL query not SOQL.String soslSearch = 'FIND \''+searchString+'\' IN ALL FIELDS RETURNING Account(Name)';Also when doing queries in APEX using...

View Article

Answer by acrosman for Can an HTML element have multiple ids?

No. While the definition from W3C for HTML 4 doesn't seem to explicitly cover your question, the definition of the name and id attribute says no spaces in the identifier:ID and NAME tokens must begin...

View Article


How do I re-map python dict keys

I am working on a program that (among other things) reads a CSV file in (it gets stored as an array of dicts in the form [{col1:data1a,col2:data2a},{col1:data1b,col2:data2b}] ). For each row, as part...

View Article

Is there are standard way to store a database schema outside a python app

I am working on a small database application in Python (currently targeting 2.5 and 2.6) using sqlite3.It would be helpful to be able to provide a series of functions that could setup the database and...

View Article


How can I validate an email address using a regular expression?

Over the years I have slowly developed a regular expression that validates most email addresses correctly, assuming they don't use an IP address as the server part.I use it in several PHP programs, and...

View Article
Browsing latest articles
Browse All 44 View Live




Latest Images