Posts by Loudon

    I know that I can add comments for editors in the templates, but I have a template that I use in multiple regions and want to be able to add a region specific comment for my editors. Is there a way to do this?

    I am having problems when uploading a file via Perch. Up until now there have been no problems, but I now get a 500 Internal Server Error message. On checking the error logs I see there is an Invalid response status 44.

    Nothing has been changed in the website and the files I am uploading are named properly and well within the upload limit. The problem occurs even when selecting files already in the assets folder.

    I contacted my hosting company and this was their reply.

    I have deleted a number of files but am still getting this error. Can anyone advise me on how I might be able to resolve this?

    Quote

    We believe to have found the issue with the site. It looks to be triggering one of our system's mod security rules. We cannot change these, unfortunately. What is happening here specifically is that when you click the save button a POST request is made to the server. This POST request has a bunch of rules it must adhere to in order to be allowed and made successfully. Unfortunately, it looks like when it is made it includes all the files on this page. As this is more than a hundred files it triggers the POST individual file upload limit and this fails. Giving the error you have been seeing.

    I have created a set of categories named RESOURCES and can output these on the webpage.


    I also have a number of resources each of which have a title, a category and an uploaded PDF file. I can output a list of these on the webpage.


    What I need to do is out put the categories and under each of these list the resources for that category. Can anyone point me in the right direction please?

    The server supports rewriting and I've added a / before the second blog.

    I tried taking out all the rules and still no joy.


    I have the following code in my .htaccess file which is located in the server under public_html


    Code
    1. RewriteEngine On
    2. RewriteCond %{REQUEST_FILENAME}.php -f
    3. RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]
    4. RewriteRule ^blog/([a-zA-Z0-9-/]+)/preview$ /blog/post.php?s=$1&preview=all [L]
    5. RewriteRule ^blog/([a-zA-Z0-9-/]+)$ blog/post.php?s=$1 [L]

    In addition there is another .htaccess file in the level above public_html which has the following data...


    I have tried with this data deleted but it doesn't seem to make any difference

    Been trying all sorts of variations but still no joy. This is what I have in my .htaccess file...


    Code
    1. RewriteEngine On
    2. RewriteCond %{REQUEST_FILENAME}.php -f
    3. RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]
    4. RewriteRule ^blog/([a-zA-Z0-9-/]+)/preview$ blog/post.php?s=$1&preview=all [L]
    5. RewriteRule ^blog/([a-zA-Z0-9-/]+)$ blog/post.php?s=$1 [L]

    I am using perch

    I'm afraid not.


    When I click on the view draft button I am taken to ...

    domainname/blog/PostTitle/preview

    instead of

    domainname/blog/post.php?s=PostTitle&preview=all


    If I manually type in domainname/blog/post.php?s=PostTitle&preview=all the draft shows properly

    I am able to preview published posts but not drafts. As per the video tutorial on rewrite rules, I have added the following to my .htacess file.

    Code
    1. RewriteRule ^blog/([a-zA-Z0-9-/]+)/preview$ /blog/post.php?s=$1&preview=all [L]
    2. RewriteRule ^/blog/([a-zA-Z0-9-/]+)$ /blog/post.php?s=$1 [L]


    Can anyone suggest how I can fix this please?

    I have set up a page where the client can go into the control panel and upload a number of dates and times for appointments. There is also a checkbox where she can indicate if this date is already booked.

    The page then displays a list of dates in a radio box format. If the date is already booked the radio box is disabled.


    When the user selects a date on the page and submits the form, is there any way this can change the value of the 'booked' checkbox?

    This is the full template

    Code
    1. <div class="form-check">
    2. <input
    3. class="form-check-input" style="text-align: left !important; font-weight: 100 !important"
    4. type="radio"
    5. name="flexRadioDefault1"
    6. id="flexRadioDefault1" value="<perch:content id="appttime" type="date" time label="Date/Time" format="d F Y H:i" native>"
    7. />
    8. <label class="form-check-label" for="flexRadioDefault1">
    9. <perch:content id="appttime" type="date" time label="Date/Time" format="d F Y H:i" native></div>