Forum Replies Created

Viewing 15 replies - 31 through 45 (of 152 total)
  • That’s a premium plugin. You should check in with the support for the plugin.

    Thread Starter poundsixzeros

    (@poundsixzeros)

    It works! Thanks @kochm!

    BTW, please credit @dinel2016 for the code. I just passed it along.

    Thread Starter poundsixzeros

    (@poundsixzeros)

    Here you go:

    function formatDocument($doc, $csl=Null, $textonly=False, $showcover=False, $showlink=False) {
    			$result = '';
    
                            // format document with a given CSL style and the CiteProc.php
                            if ($csl != Null && class_exists("citeproc")){
                            	// read the given CSL style from XML document, load it to a string, and convert it to an object
    				$cacheid = "csl-".$csl;
    				$csl_file = $this->getOutputFromCache($cacheid);
    				if (empty($csl_file)) {
    				        $curl = curl_init($csl);
    					curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    					
    					$http_headers = array(
    						'User-Agent: Junk', // Any User-Agent will do here
    					);
    					curl_setopt($curl, CURLOPT_HEADER, true);
    					curl_setopt($curl, CURLOPT_HTTPHEADER, $http_headers);
    					
                            		$csl_file = curl_exec($curl);
    					if (curl_getinfo($curl,CURLINFO_HTTP_CODE) < 400) {
    					   if ($csl_file !== false) {
    					      $pos_body = stripos($csl_file, "<?xml version");
    					      $csl_file = substr($csl_file, $pos_body);
    					      $this->updateOutputInCache($cacheid, $csl_file);
    					   } else {
    					      echo "<p>1 Mendeley Plugin Error: Failed accessing Menedley API: " . curl_error($curl) . "</p>";
    					   }
    					} else {
    					   echo "<p>2 Mendeley Plugin Error: Failed accessing Mendeley API: " . curl_getinfo($curl,CURLINFO_HTTP_CODE) . "||||" . $csl_file . "</p>";
    					   $csl_file = "";
    					}
    					curl_close($curl);
    				}
                            	$csl_object = simplexml_load_string($csl_file);
    Forum: Fixing WordPress
    In reply to: ERROR 400

    I’m sorry but I don’t. They will be able to help you. It’s a server thing.

    No wonder, though, why nothing was changing on the site when you were editing files on hostgator.

    Thanks for the update.

    Forum: Fixing WordPress
    In reply to: ERROR 400

    I’m not familiar with some of the stuff in there but I don’t see anything directly blocking your access to wp-admin.

    Going back to your original error: When I google the first couple lines, it comes up as an AWS (amazon web services) error. Are you sure hostgator is hosting the site? Or maybe they’re using AWS as a CDN?

    I’m stuck. Maybe call your hosting company for assistance or maybe someone else on this forum has ideas but as of right this second, I’m not seeing what the issue could be.

    Forum: Fixing WordPress
    In reply to: ERROR 400

    I’m not exactly sure if you got what you needed.
    I think you are saying you can’t see .htaccess but you think it’s there. Use the previously described method to get it to show. (check ‘show all files’).

    Be sure to have a backup of files before overwriting anything.

    If you are having a lot of trouble getting file manager to work properly, it may worth a phone call to the hosting company to help sort it out.

    Thread Starter poundsixzeros

    (@poundsixzeros)

    Thanks for your quick reply. I installed the new version, cleared cache (browser and plugin) and retrieved a new access token from Mendeley. Unfortunately it isn’t working with a local csl or an external one.

    I also get a Failed retrieving OAuth2 access token: {“error”:”invalid_grant”,”error_description”:”Invalid access code”} whenever I change the settings, but that’s has periodically shown up from time to time in the past so I don’t know if that means anything.

    Forum: Fixing WordPress
    In reply to: ERROR 400

    Ok. If the site root doesn’t have an .htaccess file then it needs one.

    Open up notepad and paste the following:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Save the file as “.htaccess”. Be sure there is a dot before htaccess and be sure it doesn’t end in ‘.txt’. If you save with the quotes, that should do it.

    Then upload to the site root directory, not directly to public_html, unless that is the site root. If you have multiple sites on that hosting account, it is likely a subdirectory in public_html.

    If you can see the page content when using a different theme, then yes, the theme is causing the problem. You should go to your theme’s support and see if they can help sort it out.

    Forum: Fixing WordPress
    In reply to: ERROR 400

    You need to look at the htaccess in the directory that has the files for the website you’re having trouble with.

    If you don’t have access to the site admin: to disable the plugins you need to rename the Plugins folder as described in a previous post.

    Your english is pretty good. My french is very bad so it might be easier for you to post your question in the french forum as I am not sure I can help you efficiently.

    Forum: Fixing WordPress
    In reply to: ERROR 400

    I’m not sure what you mean by “Because the .htaccess is not talking about “socialmedialeads.com.au”.”.
    If in that website’s root directory, then it is for that website.

    Here is a link to what you need to know about htaccess and wordpress.

    I think the issue is auto-increment on the ID field. I have a test site where I can break things and try to fix them. I just deselected the auto-increment box and tried to add a post and got the same error you got.

    Can you see in the create table statement of wp-posts if auto-increment is set?
    It would look something like:
    CREATE TABLEwp_posts` (
    ID bigint(20) unsigned NOT NULL AUTO_INCREMENT,`

    It seems like when you try to create a new post/page WP can’t assign the next incremented number so it implodes on itself.

    Another option is to nuke and re-import your wp-posts table from your backup.

    I don’t know if the database is the issue but sometimes things go awry when transferring the db between hosts.
    It looks like another guy on that thread repaired his database. Have you tried that? In phpmyadmin you can repair just the one table.

    Here is a link on how to repair selected tables using phpmyadmin.(disclaimer: I just googled it – don’t know anything abt that site but they had a good description and good photos too ?? )

    All of this can get dicey even if you’re comfortable in databases. Step lightly and be sure to have a backup and know how to restore it.

    Do you have another auto incremented column in the database? It kinda sounds like you have two index (ID) columns.
    Can you post a screenshot of the structure of the wp-post table? (select the “structure” tab)

    It’ll look something like this:
    https://www.dubyajay.com/site/uploads/wp-post-table-head.png

    (edit: Add ‘wp-post’)

    • This reply was modified 7 years, 6 months ago by poundsixzeros.
Viewing 15 replies - 31 through 45 (of 152 total)