[Solved] Match any ...
 
Notifications
Clear all

[Solved] Match any path with a specific host [duplicate]

0 Posts
1 Users
0 Likes
5 Views
0
Topic starter
Manolo Asks: Match any path with a specific host [duplicate]
I want to match all paths for a specific host and redirect to a new one:

Code:
redirect_from_host:
  path:     /{uri}/
  host:     www.my-old-domain.com
  defaults:
    _controller: FrameworkBundle:Redirect:urlRedirect
    path:  https://www.my-new-domain.com 
    permanent: true

This works for URL's like www.my-old-domain.com/foo/

but doesn't with: www.my-old-domain.com/foo/bar/

So I have to add more routing definitions like:

Code:
redirect_from_host_2:
  path:     /{uri}/{uri2}/
  host:     www.my-old-domain.com
  defaults:
    _controller: FrameworkBundle:Redirect:urlRedirect
    path:  https://www.my-new-domain.com 
    permanent: true
redirect_from_host_3:
  path:     /{uri}/{uri2}/{uri3}/
  host:     www.my-old-domain.com
  defaults:
    _controller: FrameworkBundle:Redirect:urlRedirect
    path:  https://www.my-new-domain.com 
    permanent: true

and so on.

Is there any way to match all paths in one routing definition?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

Unreplied Posts

[Solved] REST DELETE Call To External System Returns Status Code 0

Alan Asks: REST DELETE Call To External System Returns Status Code 0
I have a REST API call that I’m trying to make using a DELETE method. However, the request is returning a status code of 0 with nothing in the response body. If I take my endpoint and run the request in Postman it works perfectly. Any ideas what’s wrong?

Here is the example code:

Code:
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        request.setEndpoint('https://api.statuspage.io/v1/pages/' + PageId + '/subscribers/' + SubscriberId);
        request.setMethod('DELETE');
        request.setHeader('Authorization', 'OAuth ' + APIKey);  
        HttpResponse response = new HttpResponse();

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.
 
 
 

[Solved] Using other user leads on my report chart

Bob Asks: Using other user leads on my report chart
We had only 1 user, so I add another user with administrator permission (like myself), I did some changes on my dashboard and I want the same exact dashboard shows in the other user too.

I couldn’t find a way, so I start manually, but it’s not possible. For example, when I add the “Report chart” component, it can’t find any leads, however, we have thousands of leads and this user can see leads on the report page using Filter


enter image description here

So my question is how can I manage this in the page dashboard? it doesn’t have any “Filter by Owner”.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Adding title to cms footer block

JensBourgeois Asks: Adding title to cms footer block
I added a second footer block with links by adding the following code to my default.xml in my theme: app/design/frontend///Magento_Theme/layout/default.xml

Code:
<referenceContainer name="footer">
    <block class="MagentoFrameworkViewElementHtmlLinks" name="footer_links_custom">
        <arguments>
            <argument name="css_class" xsi:type="string">footer links</argument>
        </arguments>
    </block>
</referenceContainer>

<referenceBlock name="footer_links_custom">
    <block class="MagentoFrameworkViewElementHtmlLinkCurrent" name="2custom-link">
        <arguments>
            <argument name="label" xsi:type="string">Custom Links</argument>
            <argument name="path" xsi:type="string">page-url</argument>
        </arguments>
    </block>
</referenceBlock>

What is the easiest way to add a title to the my footer_links_custom block, is there any way to do this in a simple manner? I’ve tried setting an argument “title” but that didn’t work obviously. Is there any way we can know all the attributes there are for a certain block? (css_class, label, path, …) Is there no .phtml file for the footer links block?

Magento 2 leaves me behind with a lot of questions…Thanks for the help!

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] not getting child product for bundle product, using Magento 2 REST API

Nikhil Joshi Asks: not getting child product for bundle product, using Magento 2 REST API
I am trying to get child products for a bundle product using Magento 2 REST api /V1/bundle-products/{productSku}/children. But it always return empty array

Code:
 "extension_attributes": {
   "bundle_product_options": [
      {
        "option_id": 76,
        "title": "curriculum2",
        "required": true,
        "type": "checkbox",
        "position": 1,
        "sku": "f2f89c0ef1-5f0a47c874",
        "product_links": []

  } ]}

I have tried to get details using product details api too but no success. When i login to magento admin i can see the child product in same bundle product.

Can any one help me finding what i should do?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] How can I save/restore window positions when I undock/dock my laptop?

cjm Asks: How can I save/restore window positions when I undock/dock my laptop?
I have a laptop with a docking station that has a large monitor connected to it. When the laptop is docked, I use the monitor as my primary display, and the laptop screen as a secondary display.

When I undock, the laptop screen becomes my primary display, and all the windows move over to it. When I dock the laptop, the monitor automatically becomes the primary display again, but the windows all stay on the laptop screen. I have to drag each one over to the monitor and resize it.

How can I get my windows to automatically resume the positions and sizes they had just before I undocked (assuming they’re still open)? All I’ve been able to find are answers talking about restoring programs when you log in. That’s not what I’m looking for.

I’m using Gnome 3 on Arch Linux.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] How to include python script inside a bash script

Amal P Ramesh Asks: How to include python script inside a bash script
I need to include below python script inside a bash script.

If the bash script end success, I need to execute the below script:

Code:
#!/usr/bin/python    
from smtplib import SMTP
import datetime
debuglevel = 0

smtp = SMTP()
smtp.set_debuglevel(debuglevel)
smtp.connect('192.168.75.1', 25)
smtp.login('my_mail', 'mail_passwd')

from_addr = "My Name <my_mail@192.168.75.1>"
to_addr = "<my_mail@192.168.75.1"
subj = "Process completed"
date = datetime.datetime.now().strftime( "%d/%m/%Y %H:%M" )
#print (date)
message_text = "Hai..nnThe process completed."

msg = "From: %snTo: %snSubject: %snDate: %snn%s" % ( from_addr, to_addr, subj, date, message_text )

smtp.sendmail(from_addr, to_addr, msg)
smtp.quit()

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] How do I configure grub to boot another linux distribution off an lvm partition?

Cestarian Asks: How do I configure grub to boot another linux distribution off an lvm partition?
(I no longer have this setup so I cannot test new answers, sorry. I had to switch computers and am now only using arch; I am leaving the question as it is though since I’d love to know a solution if it occurs again, grub has been very hostile towards me these past few months) I have fedora 23 as my main OS with custom partitioning (all physical partitions) /boot/efi=/dev/sda1 root=/dev/sda3. Then on /dev/Sda2 I just set up an LVM physical partition, and created an LVM group (arch) and volume (root) and then I installed Arch Linux (without bootloader) on /dev/arch/root

I have /dev/sda (GPT), /dev/sdb (GPT) then grub also seems to detect a hd2 and gives errors about being unable to load it (I assume this is the LVM physical partition) anyhow, I use os-prober and grub2-mkconfig to detect my arch installation, which it successfully does (and does so two times, I get two menu entries for it); but when I try to boot it I get the following errors:

Code:
error: failure reading sector 0x0fc from 'hd2'.
error: failure reading sector 0x0e0 from 'hd2'.
error: failure reading sector 0x0 from 'hd2'.
error: can't find command 'linux'.
error: can't find command 'initrd'.

I only get the sector reading errors on the first boot attempt (for the record, fsck reports the drive to be clean) any retries only give me the can’t find command errors. This is the grub.conf menuentry:

Code:
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Arch (on /dev/mapper/arch-Root)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-38305dfb-279b-4490-948b-480b81fef81f' {
    insmod part_gpt
    insmod lvm
    insmod ext2
    set root='lvmid/6ZmQFy-ijXr-mYra-3Gp9-l0dh-J4Wi-GSHXhd/WGN2VN-t34t-rYWi-kvje-2BfF-WoD4-4NinnP'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint='lvmid/6ZmQFy-ijXr-mYra-3Gp9-l0dh-J4Wi-GSHXhd/WGN2VN-t34t-rYWi-kvje-2BfF-WoD4-4NinnP'  38305dfb-279b-4490-948b-480b81fef81f
    else
      search --no-floppy --fs-uuid --set=root 38305dfb-279b-4490-948b-480b81fef81f
    fi
    linux /boot/vmlinuz-linux root=UUID=38305dfb-279b-4490-948b-480b81fef81f rw quiet
    initrd /boot/initramfs-linux.img
}

Anyone got any ideas how to fix this? Any solution that will allow me to boot into arch (besides reinstalling the bootloader from arch instead of fedora) will be fine; I don’t mind getting my hands dirty editing the grub.cfg file by hand.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] CentOS: Install git with yum says glibc requires glibc-common older than installed

Neil Asks: CentOS: Install git with yum says glibc requires glibc-common older than installed
I’m using CentOS 6 from Docker, and when I install git, I get this dependency error:

Code:
Error: Package: glibc-2.12-1.166.el6_7.7.i686 (updates)
           Requires: glibc-common = 2.12-1.166.el6_7.7
           Installed: glibc-common-2.12-1.192.el6.x86_64 (@CR/6.7)
               glibc-common = 2.12-1.192.el6
           Available: glibc-common-2.12-1.166.el6.x86_64 (base)
               glibc-common = 2.12-1.166.el6
           Available: glibc-common-2.12-1.166.el6_7.1.x86_64 (updates)
               glibc-common = 2.12-1.166.el6_7.1
           Available: glibc-common-2.12-1.166.el6_7.3.x86_64 (updates)
               glibc-common = 2.12-1.166.el6_7.3
           Available: glibc-common-2.12-1.166.el6_7.7.x86_64 (updates)
               glibc-common = 2.12-1.166.el6_7.7

You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

Service 'docker-project' failed to build: The command '/bin/sh -c yum install -y 
    java-1.8.0-openjdk-devel.x86_64 
    unzip 
    git 
    && yum clean all' returned a non-zero code: 1

This was working a few days ago without any changes. What happened to the CentOS repository?

For reference, here is my Dockerfile:

Code:
FROM centos:6
RUN yum install -y 
        java-1.8.0-openjdk-devel.x86_64 
        unzip 
        git 
    && yum clean all

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] How can I fix a “conflicting requests” kernel module error when running dnf update on Fedora 32?

Mister October Asks: How can I fix a “conflicting requests” kernel module error when running dnf update on Fedora 32?
Background: I’m running Fedora 32 on a Thinkpad. Current kernel version is as follows:

Linux 5.8.4-200.fc32.x86_64 x86_64

Problem: It was working as expected for several months, but now when I run dnf update the following error is given:

Code:
Error: 
 Problem 1: package kernel-modules-extra-5.7.15-200.fc32.x86_64 requires kernel-uname-r = 5.7.15-200.fc32.x86_64, but none of the providers can be installed
  - conflicting requests
 Problem 2: package kernel-5.7.15-200.fc32.x86_64 requires kernel-core-uname-r = 5.7.15-200.fc32.x86_64, but none of the providers can be installed
  - conflicting requests

Current situation / what I’ve tried: My (current, likely incorrect) understanding is that this older kernel package is being specified by some other package, and can’t be installed because it’s older and does not appear in the default repos.

I can get non-kernel packages to update by running dnf --excludepkgs=kernel* , but I’d like to 1) understand, and 2) fix this error so that I can get kernel updates normally.

I have researched the error somewhat (see links below), but none of the similar conflict errors match my situation very closely, and I’m reluctant to remove or disable the denoted module(s) without understanding what that might do.

All guidance much appreciated!

Links I’ve investigate to date:

(How to fix “Problem: conflicting requests…” on dnf install on Centos?)

(“package X requires Y, but none of the providers can be installed”)

(Askbot.fedoraproject.org archives are going away)

(yum update returns kernel error) NOTE: this one looks similar, but the config file fix suggested here is not applicable to my configuration

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Ubuntu vs CentOS Imagemagick output differences

Kalvin Klien Asks: Ubuntu vs CentOS Imagemagick output differences
I’m having an issue with ImageMagick on different machines.

The command I’m running: identify -verbose *.jpg 2>&1 | grep “Corrupt”

Here I’m trying to identify images in a folder that are corrupt:


partially uploaded image - corrupt

On CentOS machine I’m getting the correct output for this image:

Code:
identify: Corrupt JPEG data: premature end of data segment `sdfsd.jpg' @ warning/jpeg.c/JPEGWarningHandler/390.

But, on Ubuntu Machine I’m not getting Corrupt line at all.

ImageMagick Version on CentOS:

Code:
Version: ImageMagick 6.9.10-68 Q16 x86_64 2021-02-24 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(3.1)
Delegates (built-in): bzlib cairo fontconfig freetype gslib jng jp2 jpeg lcms ltdl lzma openexr pangocairo png ps rsvg tiff wmf x xml zlib

ImageMagick Version on Ubuntu

Code:
Version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib

What gives? Why is the output different? Why is there no “corrupt” output?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

Share: